Index: third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
index ff7e083e9a245770288bfb423c157cc0456b02bd..b3cfd254aab977b35ff409ea661458d69e4044f7 100644 |
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
@@ -151,7 +151,13 @@ ScriptPromise MediaKeys::setServerCertificate(ScriptState* scriptState, const DO |
// 3. Let certificate be a copy of the contents of the serverCertificate |
// parameter. |
- RefPtr<DOMArrayBuffer> serverCertificateBuffer = DOMArrayBuffer::create(serverCertificate.data(), serverCertificate.byteLength()); |
+ // |
+ // TODO(junov): crbug.com/536816 |
+ // Use createOrNull instead of deprecatedCreateOrCrash. It would probably |
+ // be appropriate to reject the promise with a RangeError exception when |
+ // array buffer allocation fails, but that behavior probably needs |
+ // clarification in the spec. |
+ RefPtr<DOMArrayBuffer> serverCertificateBuffer = DOMArrayBuffer::deprecatedCreateOrCrash(serverCertificate.data(), serverCertificate.byteLength()); |
// 4. Let promise be a new promise. |
SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryptionModuleResultPromise(scriptState); |