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

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

Issue 1264913002: [Extension ServiceWorkers] Blink: Passing v8::context to extensions dispatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed v8::Context parameter Created 5 years, 4 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/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index 5c0b410876bd36448b622d837a969523647b7de1..afcc013a55dbb06b92ea2421d3ed74e5b9caeaa6 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -250,6 +250,10 @@ void WorkerThread::initialize(PassOwnPtr<WorkerThreadStartupData> startupData)
script->initializeContextIfNeeded();
m_workerGlobalScope->workerInspectorController()->workerContextInitialized(startMode == PauseWorkerGlobalScopeOnStart);
+ if (script->scriptState()->contextIsValid()) {
dcheng 2015/08/05 00:04:53 How come we didn't need to check if the context wa
annekao 2015/08/05 16:43:02 I initially put this check in to address what falk
falken 2015/08/06 03:37:20 Hm, I was thinking of a different case, but it loo
+ m_workerReportingProxy.didInitializeWorkerContext();
+ }
+
OwnPtrWillBeRawPtr<CachedMetadataHandler> handler(workerGlobalScope()->createWorkerScriptCachedMetadataHandler(scriptURL, cachedMetaData.get()));
bool success = script->evaluate(ScriptSourceCode(sourceCode, scriptURL), nullptr, handler.get(), v8CacheOptions);
m_workerGlobalScope->didEvaluateWorkerScript();

Powered by Google App Engine
This is Rietveld 408576698