Chromium Code Reviews| Index: content/browser/service_worker/service_worker_dispatcher_host.cc |
| diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc |
| index 20615b6d1f67510c56f560b689276ed2982bb075..ec4cbecbd9000175c86386165c855c69a678a051 100644 |
| --- a/content/browser/service_worker/service_worker_dispatcher_host.cc |
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc |
| @@ -659,11 +659,19 @@ void ServiceWorkerDispatcherHost::OnWorkerReadyForInspection( |
| void ServiceWorkerDispatcherHost::OnWorkerScriptLoaded( |
| int embedded_worker_id, |
| - int thread_id) { |
| + int thread_id, |
| + int provider_id) { |
| TRACE_EVENT0("ServiceWorker", |
| "ServiceWorkerDispatcherHost::OnWorkerScriptLoaded"); |
| if (!GetContext()) |
| return; |
| + |
| + ServiceWorkerProviderHost* provider_host = |
| + GetContext()->GetProviderHost(render_process_id_, provider_id); |
| + if (!provider_host) |
| + return; // The provider has already been destroyed. |
|
kinuko
2015/01/28 07:13:11
Does this happen for ServiceWorker?
nhiroki
2015/01/28 13:43:22
Good point. ProviderDestroyed message always arriv
|
| + provider_host->SetReadyToSend(thread_id); |
| + |
| EmbeddedWorkerRegistry* registry = GetContext()->embedded_worker_registry(); |
| if (!registry->CanHandle(embedded_worker_id)) |
| return; |