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

Unified Diff: Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 1287103002: [Extension ServiceWorkers] Blink: Passing v8::context to extensions dispatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index 8dc043e639b0f92687d319adbe5f27c5f11050bf..f48c98e9006739b2aba2ffb624b8e25aa95eb5e7 100644
--- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -204,6 +204,13 @@ void ServiceWorkerGlobalScopeProxy::didEvaluateWorkerScript(bool success)
m_client.didEvaluateWorkerScript(success);
}
+void ServiceWorkerGlobalScopeProxy::didInitializeWorkerContext()
+{
+ ASSERT(m_workerGlobalScope);
+ ScriptState::Scope scope(m_workerGlobalScope->script()->scriptState());
+ m_client.didInitializeWorkerContext(m_workerGlobalScope->script()->context(), WebURL(m_documentURL));
+}
+
void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope* workerGlobalScope)
{
ASSERT(!m_workerGlobalScope);
@@ -230,6 +237,7 @@ void ServiceWorkerGlobalScopeProxy::workerThreadTerminated()
ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerImpl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client)
: m_embeddedWorker(embeddedWorker)
, m_document(document)
+ , m_documentURL(document.url().copy())
, m_client(client)
, m_workerGlobalScope(nullptr)
{
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | public/web/modules/serviceworker/WebServiceWorkerContextClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698