Index: content/browser/service_worker/service_worker_provider_host.cc |
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc |
index 2bb6499487916db409c6eecbd9c10cae0863b7e2..51dff4550481d24fbb9103dff0187210481b3492 100644 |
--- a/content/browser/service_worker/service_worker_provider_host.cc |
+++ b/content/browser/service_worker/service_worker_provider_host.cc |
@@ -84,6 +84,11 @@ void ServiceWorkerProviderHost::OnRegistrationFailed( |
void ServiceWorkerProviderHost::OnSkippedWaiting( |
ServiceWorkerRegistration* registration) { |
DCHECK_EQ(associated_registration_.get(), registration); |
+ // A client is "using" a registration if it is controlled by the active |
+ // worker of the registration. skipWaiting doesn't cause a client to start |
+ // using the registration. |
+ if (!controlling_version_) |
+ return; |
ServiceWorkerVersion* active_version = registration->active_version(); |
DCHECK_EQ(active_version->status(), ServiceWorkerVersion::ACTIVATING); |
SetControllerVersionAttribute(active_version); |