Chromium Code Reviews

Unified Diff: Source/modules/encryptedmedia/MediaKeySystemAccess.cpp

Issue 783423003: Make ScriptPromiseResolver RefCountedWillBeRefCountedGarbageCollected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp b/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
index 4f3e186b6f35d1624df31352dc39117b35d67b7e..dc6e73451411aaca984a38bb39367f27f867ae22 100644
--- a/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
+++ b/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
@@ -14,6 +14,7 @@
#include "modules/encryptedmedia/MediaKeysController.h"
#include "platform/Logging.h"
#include "platform/Timer.h"
+#include "platform/heap/Handle.h"
#include "public/platform/WebContentDecryptionModule.h"
namespace {
@@ -36,7 +37,7 @@ private:
blink::ScriptPromise MediaKeysInitializer::create(blink::ScriptState* scriptState, const String& keySystem)
{
- RefPtr<MediaKeysInitializer> initializer = adoptRef(new MediaKeysInitializer(scriptState, keySystem));
+ RefPtrWillBeRawPtr<MediaKeysInitializer> initializer = blink::adoptRefWillBeNoop(new MediaKeysInitializer(scriptState, keySystem));
initializer->suspendIfNeeded();
initializer->keepAliveWhilePending();
return initializer->promise();

Powered by Google App Engine