Chromium Code Reviews| Index: content/child/service_worker/web_service_worker_provider_impl.cc |
| diff --git a/content/child/service_worker/web_service_worker_provider_impl.cc b/content/child/service_worker/web_service_worker_provider_impl.cc |
| index 8b89c43f267c66ae4b9b1e25c5a75b5d2286823d..ad9b041dfca47264a0c58e79091ca6fb7e1d0cf0 100644 |
| --- a/content/child/service_worker/web_service_worker_provider_impl.cc |
| +++ b/content/child/service_worker/web_service_worker_provider_impl.cc |
| @@ -47,12 +47,13 @@ void WebServiceWorkerProviderImpl::setClient( |
| // for more context) |
| GetDispatcher()->AddScriptClient(provider_id_, client); |
| - int handle_id = context_->current_handle_id(); |
| - if (handle_id == kInvalidServiceWorkerHandleId) |
| - return; |
| + if (context_->waiting_handle_id() != kInvalidServiceWorkerHandleId) |
| + client->setWaiting( |
| + GetDispatcher()->GetServiceWorker(context_->waiting()->info(), false)); |
|
falken
2014/06/10 20:34:28
as the body is more than a single line, the if sta
|
| - client->setCurrentServiceWorker( |
| - GetDispatcher()->GetServiceWorker(context_->current()->info(), false)); |
| + if (context_->current_handle_id() != kInvalidServiceWorkerHandleId) |
| + client->setController( |
| + GetDispatcher()->GetServiceWorker(context_->current()->info(), false)); |
|
falken
2014/06/10 20:34:28
here too
|
| } |
| void WebServiceWorkerProviderImpl::registerServiceWorker( |