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

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

Issue 2629823002: Add CHECKs to make sure ThreadableLoader has not been created multiple times (Closed)
Patch Set: fix Created 3 years, 11 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.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
index c0d1b0762f7b094daf11662bd57504ee22ffffa0..64d6f9bce315726c13907925cdb2f31f19dcc64b 100644
--- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
@@ -78,6 +78,8 @@ void WorkerScriptLoader::loadSynchronously(
ResourceLoaderOptions resourceLoaderOptions;
resourceLoaderOptions.allowCredentials = AllowStoredCredentials;
+ // TODO(yhirano): Remove this CHECK once https://crbug.com/667254 is fixed.
+ CHECK(!m_threadableLoader);
WorkerThreadableLoader::loadResourceSynchronously(
toWorkerGlobalScope(executionContext), request, *this, options,
resourceLoaderOptions);
@@ -108,6 +110,8 @@ void WorkerScriptLoader::loadAsynchronously(
// (E.g. see crbug.com/524694 for why we can't easily remove this protect)
RefPtr<WorkerScriptLoader> protect(this);
m_needToCancel = true;
+ // TODO(yhirano): Remove this CHECK once https://crbug.com/667254 is fixed.
+ CHECK(!m_threadableLoader);
m_threadableLoader = ThreadableLoader::create(executionContext, this, options,
resourceLoaderOptions);
m_threadableLoader->start(request);

Powered by Google App Engine
This is Rietveld 408576698