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 e2a2574c6ee8dd95dd08758f12c36cd6c934f565..75a845dfd67438103b24338b2f744fd055be3bd1 100644 |
--- a/content/child/service_worker/web_service_worker_provider_impl.cc |
+++ b/content/child/service_worker/web_service_worker_provider_impl.cc |
@@ -53,6 +53,10 @@ void WebServiceWorkerProviderImpl::setClient( |
GetDispatcher()->GetOrCreateServiceWorker( |
ServiceWorkerHandleReference::Create(context_->controller()->info(), |
thread_safe_sender_.get())); |
+ |
+ // Sync controllee's use counter with service worker's use counter. |
+ for (uint32_t feature : context_->used_features()) |
+ client->countFeature(feature); |
client->setController(WebServiceWorkerImpl::CreateHandle(controller), |
false /* shouldNotifyControllerChange */); |
} |