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 540b4489bd8a134771d55ff36dd5cae01f50b7fe..c00c1968d992da965f41af455b7746bfb77b698e 100644 |
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
@@ -49,12 +49,12 @@ |
return m_result; |
} |
- DOMArrayBuffer* data() const |
+ const RefPtr<DOMArrayBuffer> data() const |
{ |
return m_data; |
} |
- static PendingAction* CreatePendingSetServerCertificate(ContentDecryptionModuleResult* result, DOMArrayBuffer* serverCertificate) |
+ static PendingAction* CreatePendingSetServerCertificate(ContentDecryptionModuleResult* result, PassRefPtr<DOMArrayBuffer> serverCertificate) |
{ |
ASSERT(result); |
ASSERT(serverCertificate); |
@@ -68,18 +68,17 @@ |
DEFINE_INLINE_TRACE() |
{ |
visitor->trace(m_result); |
- visitor->trace(m_data); |
} |
private: |
- PendingAction(ContentDecryptionModuleResult* result, DOMArrayBuffer* data) |
+ PendingAction(ContentDecryptionModuleResult* result, PassRefPtr<DOMArrayBuffer> data) |
: m_result(result) |
, m_data(data) |
{ |
} |
const Member<ContentDecryptionModuleResult> m_result; |
- const Member<DOMArrayBuffer> m_data; |
+ const RefPtr<DOMArrayBuffer> m_data; |
}; |
MediaKeys* MediaKeys::create(ExecutionContext* context, const WebVector<WebEncryptedMediaSessionType>& supportedSessionTypes, PassOwnPtr<WebContentDecryptionModule> cdm) |
@@ -154,14 +153,14 @@ |
// 3. Let certificate be a copy of the contents of the serverCertificate |
// parameter. |
- DOMArrayBuffer* serverCertificateBuffer = DOMArrayBuffer::create(serverCertificate.data(), serverCertificate.byteLength()); |
+ RefPtr<DOMArrayBuffer> serverCertificateBuffer = DOMArrayBuffer::create(serverCertificate.data(), serverCertificate.byteLength()); |
// 4. Let promise be a new promise. |
SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryptionModuleResultPromise(scriptState); |
ScriptPromise promise = result->promise(); |
// 5. Run the following steps asynchronously (documented in timerFired()). |
- m_pendingActions.append(PendingAction::CreatePendingSetServerCertificate(result, serverCertificateBuffer)); |
+ m_pendingActions.append(PendingAction::CreatePendingSetServerCertificate(result, serverCertificateBuffer.release())); |
if (!m_timer.isActive()) |
m_timer.startOneShot(0, BLINK_FROM_HERE); |