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

Unified Diff: third_party/WebKit/Source/modules/worklet/Worklet.cpp

Issue 1916283003: [K6] Replace bind() + GCed pointers with retainedRef() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_5c
Patch Set: Rebase 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/worklet/Worklet.cpp
diff --git a/third_party/WebKit/Source/modules/worklet/Worklet.cpp b/third_party/WebKit/Source/modules/worklet/Worklet.cpp
index 3d5453bffe9dd8635c6c8051a5dcf52ca9a5c2b9..e909f388b819ceecff6422c2d6b09a0ec419371c 100644
--- a/third_party/WebKit/Source/modules/worklet/Worklet.cpp
+++ b/third_party/WebKit/Source/modules/worklet/Worklet.cpp
@@ -43,8 +43,8 @@ ScriptPromise Worklet::import(ScriptState* scriptState, const String& url)
m_scriptLoaders.append(WorkerScriptLoader::create());
m_scriptLoaders.last()->loadAsynchronously(*getExecutionContext(), scriptURL, DenyCrossOriginRequests,
getExecutionContext()->securityContext().addressSpace(),
- bind(&Worklet::onResponse, this),
- bind(&Worklet::onFinished, this, unretainedUnsafe(m_scriptLoaders.last().get()), resolver));
+ bind(&Worklet::onResponse, retainedRef(this)),
+ bind(&Worklet::onFinished, retainedRef(this), unretainedUnsafe(m_scriptLoaders.last().get()), retainedRef(resolver)));
return promise;
}
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBDevice.cpp ('k') | third_party/WebKit/Source/platform/heap/Handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698