Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/crypto/Crypto.cpp ('k') | Source/modules/encryptedmedia/MediaKeys.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 } 111 }
112 112
113 void MediaKeySession::update(Uint8Array* key, ExceptionState& es) 113 void MediaKeySession::update(Uint8Array* key, ExceptionState& es)
114 { 114 {
115 // From <http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/e ncrypted-media.html#dom-addkey>: 115 // From <http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/e ncrypted-media.html#dom-addkey>:
116 // The addKey(key) method must run the following steps: 116 // The addKey(key) method must run the following steps:
117 // 1. If the first or second argument [sic] is null or an empty array, throw an InvalidAccessError. 117 // 1. If the first or second argument [sic] is null or an empty array, throw an InvalidAccessError.
118 // NOTE: the reference to a "second argument" is a spec bug. 118 // NOTE: the reference to a "second argument" is a spec bug.
119 if (!key || !key->length()) { 119 if (!key || !key->length()) {
120 es.throwDOMException(InvalidAccessError); 120 es.throwUninformativeAndGenericDOMException(InvalidAccessError);
121 return; 121 return;
122 } 122 }
123 123
124 // 2. Schedule a task to handle the call, providing key. 124 // 2. Schedule a task to handle the call, providing key.
125 m_pendingKeys.append(key); 125 m_pendingKeys.append(key);
126 m_addKeyTimer.startOneShot(0); 126 m_addKeyTimer.startOneShot(0);
127 } 127 }
128 128
129 void MediaKeySession::addKeyTimerFired(Timer<MediaKeySession>*) 129 void MediaKeySession::addKeyTimerFired(Timer<MediaKeySession>*)
130 { 130 {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 { 197 {
198 return eventNames().interfaceForMediaKeySession; 198 return eventNames().interfaceForMediaKeySession;
199 } 199 }
200 200
201 ScriptExecutionContext* MediaKeySession::scriptExecutionContext() const 201 ScriptExecutionContext* MediaKeySession::scriptExecutionContext() const
202 { 202 {
203 return ContextLifecycleObserver::scriptExecutionContext(); 203 return ContextLifecycleObserver::scriptExecutionContext();
204 } 204 }
205 205
206 } 206 }
OLDNEW
« no previous file with comments | « Source/modules/crypto/Crypto.cpp ('k') | Source/modules/encryptedmedia/MediaKeys.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698