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

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

Issue 1213443006: Invoke WorkerScriptLoader's m_finishedCallback callback safely. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review #3 Created 5 years, 6 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: Source/core/workers/WorkerScriptLoader.h
diff --git a/Source/core/workers/WorkerScriptLoader.h b/Source/core/workers/WorkerScriptLoader.h
index c8c8f13ff34d6f1625eecf4bc867104cfc7cc9c4..62f679e8b03c495133855dcfe525fb0134eaac9d 100644
--- a/Source/core/workers/WorkerScriptLoader.h
+++ b/Source/core/workers/WorkerScriptLoader.h
@@ -57,6 +57,7 @@ public:
// TODO: finishedCallback is not currently guaranteed to be invoked if 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 notifyError();
@@ -107,7 +108,6 @@ private:
bool m_failed;
unsigned long m_identifier;
long long m_appCacheID;
- bool m_finishing;
OwnPtr<Vector<char>> m_cachedMetadata;
WebURLRequest::RequestContext m_requestContext;
RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy;
« no previous file with comments | « no previous file | Source/core/workers/WorkerScriptLoader.cpp » ('j') | Source/core/workers/WorkerScriptLoader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698