Index: content/renderer/service_worker/service_worker_context_client.cc |
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc |
index de57d4ce2afe15b41ccd6e2fe73f9b2ed3a1d0c2..8295e7e1ab4d70d7a92debb241779e6d6fcbff8a 100644 |
--- a/content/renderer/service_worker/service_worker_context_client.cc |
+++ b/content/renderer/service_worker/service_worker_context_client.cc |
@@ -389,15 +389,16 @@ void ServiceWorkerContextClient::didEvaluateWorkerScript(bool success) { |
void ServiceWorkerContextClient::didInitializeWorkerContext( |
v8::Local<v8::Context> context, |
const blink::WebURL& url) { |
- // TODO(annekao): Remove WebURL parameter from Blink (since url and script_url |
- // are equal). Also remove m_documentURL from ServiceWorkerGlobalScopeProxy. |
- DCHECK_EQ(script_url_, GURL(url)); |
+ // TODO(annekao): Remove WebURL parameter from Blink, it's at best redundant |
+ // given |script_url_|, and may be empty in the future. |
+ // Also remove m_documentURL from ServiceWorkerGlobalScopeProxy. |
GetContentClient() |
->renderer() |
->DidInitializeServiceWorkerContextOnWorkerThread(context, script_url_); |
} |
-void ServiceWorkerContextClient::willDestroyWorkerContext() { |
+void ServiceWorkerContextClient::willDestroyWorkerContext( |
+ v8::Local<v8::Context> context) { |
// At this point OnWorkerRunLoopStopped is already called, so |
// worker_task_runner_->RunsTasksOnCurrentThread() returns false |
// (while we're still on the worker thread). |
@@ -412,7 +413,7 @@ void ServiceWorkerContextClient::willDestroyWorkerContext() { |
g_worker_client_tls.Pointer()->Set(NULL); |
GetContentClient()->renderer()->WillDestroyServiceWorkerContextOnWorkerThread( |
- script_url_); |
+ context, script_url_); |
} |
void ServiceWorkerContextClient::workerContextDestroyed() { |