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

Unified Diff: Source/core/workers/WorkerThread.cpp

Issue 270873005: Initializes the context of WorkerScriptController before calling willEvaluateWorkerScript. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add isExecutionForbidden check Created 6 years, 7 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
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index 0a977310beee8b01e1c3aa594247986632fa0274..3d81fbe0afb9534b648e6b5426cf40a64f09469e 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -128,6 +128,8 @@ void WorkerThread::workerThread()
m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get());
WorkerScriptController* script = m_workerGlobalScope->script();
+ if (!script->isExecutionForbidden())
+ script->initializeContextIfNeeded();
InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), startMode);
script->evaluate(ScriptSourceCode(sourceCode, scriptURL));
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698