Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp

Issue 1549143002: Add thread affinity and ASSERT() for same-thread restriction to WTF::Function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_ThreadSafeBindByVariadicTemplate
Patch Set: Rebase. Created 4 years, 10 months 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: third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
index 7b81cd8358b89f19cfc4deea2a657eedd2934eeb..2bf55411d711beda4bd83c74bcec070e7054f13f 100644
--- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
@@ -82,7 +82,7 @@ void WorkerScriptLoader::loadSynchronously(ExecutionContext& executionContext, c
WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(executionContext), request, *this, options, resourceLoaderOptions);
}
-void WorkerScriptLoader::loadAsynchronously(ExecutionContext& executionContext, const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, PassOwnPtr<Closure> responseCallback, PassOwnPtr<Closure> finishedCallback)
+void WorkerScriptLoader::loadAsynchronously(ExecutionContext& executionContext, const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, PassOwnPtr<SameThreadClosure> responseCallback, PassOwnPtr<SameThreadClosure> finishedCallback)
{
ASSERT(responseCallback || finishedCallback);
m_responseCallback = responseCallback;
@@ -222,7 +222,7 @@ void WorkerScriptLoader::notifyFinished()
if (!m_finishedCallback)
return;
- OwnPtr<Closure> callback = m_finishedCallback.release();
+ OwnPtr<SameThreadClosure> callback = m_finishedCallback.release();
(*callback)();
}
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerScriptLoader.h ('k') | third_party/WebKit/Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine