| Index: content/child/service_worker/service_worker_dispatcher.cc
|
| diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
|
| index 8608ed0443095e6fcf25064c9ee7cab0299a03b5..165d8d7022581cbe96b765ee41bb9a2ac7a39bce 100644
|
| --- a/content/child/service_worker/service_worker_dispatcher.cc
|
| +++ b/content/child/service_worker/service_worker_dispatcher.cc
|
| @@ -703,8 +703,12 @@ void ServiceWorkerDispatcher::OnSetControllerServiceWorker(
|
| scoped_ptr<ServiceWorkerHandleReference> handle_ref =
|
| ServiceWorkerHandleReference::Adopt(info, thread_safe_sender_.get());
|
| ProviderContextMap::iterator provider = provider_contexts_.find(provider_id);
|
| - if (provider != provider_contexts_.end())
|
| - provider->second->OnSetControllerServiceWorker(handle_ref.Pass());
|
| + if (provider != provider_contexts_.end()) {
|
| + if (info.handle_id == kInvalidServiceWorkerVersionId)
|
| + provider->second->OnSetControllerServiceWorker(nullptr);
|
| + else
|
| + provider->second->OnSetControllerServiceWorker(handle_ref.Pass());
|
| + }
|
|
|
| ProviderClientMap::iterator found = provider_clients_.find(provider_id);
|
| if (found != provider_clients_.end()) {
|
|
|