Chromium Code Reviews| 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 55cf381ce034c50eb5c4d170f7a106005cfd49cb..569f6972131ca604161833c29547701a557173b7 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)); |
|
not at google - send to devlin
2015/08/26 01:17:07
I removed this DCHECK because in order to address
|
| + // 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) { |
|
kinuko
2015/08/26 09:04:18
Looking into https://codereview.chromium.org/13108
not at google - send to devlin
2015/08/26 17:29:02
A raw pointer of a v8::Context? How would that hel
kinuko
2015/08/27 00:36:55
I was thinking about using a pointer to 'this', Se
not at google - send to devlin
2015/08/27 15:11:50
I would need to move this into content/public for
|
| // 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() { |