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

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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 c00c1968d992da965f41af455b7746bfb77b698e..540b4489bd8a134771d55ff36dd5cae01f50b7fe 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
@@ -49,12 +49,12 @@ public:
return m_result;
}
- const RefPtr<DOMArrayBuffer> data() const
+ DOMArrayBuffer* data() const
{
return m_data;
}
- static PendingAction* CreatePendingSetServerCertificate(ContentDecryptionModuleResult* result, PassRefPtr<DOMArrayBuffer> serverCertificate)
+ static PendingAction* CreatePendingSetServerCertificate(ContentDecryptionModuleResult* result, DOMArrayBuffer* serverCertificate)
{
ASSERT(result);
ASSERT(serverCertificate);
@@ -68,17 +68,18 @@ public:
DEFINE_INLINE_TRACE()
{
visitor->trace(m_result);
+ visitor->trace(m_data);
}
private:
- PendingAction(ContentDecryptionModuleResult* result, PassRefPtr<DOMArrayBuffer> data)
+ PendingAction(ContentDecryptionModuleResult* result, DOMArrayBuffer* data)
: m_result(result)
, m_data(data)
{
}
const Member<ContentDecryptionModuleResult> m_result;
- const RefPtr<DOMArrayBuffer> m_data;
+ const Member<DOMArrayBuffer> m_data;
};
MediaKeys* MediaKeys::create(ExecutionContext* context, const WebVector<WebEncryptedMediaSessionType>& supportedSessionTypes, PassOwnPtr<WebContentDecryptionModule> cdm)
@@ -153,14 +154,14 @@ 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());
+ 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.release()));
+ m_pendingActions.append(PendingAction::CreatePendingSetServerCertificate(result, serverCertificateBuffer));
if (!m_timer.isActive())
m_timer.startOneShot(0, BLINK_FROM_HERE);

Powered by Google App Engine
This is Rietveld 408576698