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

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

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. 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/core/workers/WorkerScriptLoader.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h
index ae1b922b95dcf00af55c682d44dcac06cf348a91..67c44a3b2a3cb4382ec0424df85327f3fd38be8e 100644
--- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h
+++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h
@@ -61,7 +61,7 @@ public:
// used from worker context and the worker shuts down in the middle of an
// operation. This will cause leaks when we support nested workers.
// Note that callbacks could be invoked before loadAsynchronously() returns.
- void loadAsynchronously(ExecutionContext&, const KURL&, CrossOriginRequestPolicy, PassOwnPtr<Closure> responseCallback, PassOwnPtr<Closure> finishedCallback);
+ void loadAsynchronously(ExecutionContext&, const KURL&, CrossOriginRequestPolicy, PassOwnPtr<SameThreadClosure> responseCallback, PassOwnPtr<SameThreadClosure> finishedCallback);
// This will immediately invoke |finishedCallback| if loadAsynchronously()
// is in progress.
@@ -105,8 +105,8 @@ private:
void processContentSecurityPolicy(const ResourceResponse&);
// Callbacks for loadAsynchronously().
- OwnPtr<Closure> m_responseCallback;
- OwnPtr<Closure> m_finishedCallback;
+ OwnPtr<SameThreadClosure> m_responseCallback;
+ OwnPtr<SameThreadClosure> m_finishedCallback;
RefPtr<ThreadableLoader> m_threadableLoader;
String m_responseEncoding;

Powered by Google App Engine
This is Rietveld 408576698