Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: content/browser/service_worker/service_worker_registration.cc

Issue 947953003: ServiceWorker: Add running service worker check before claim a provider host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_registration.cc
diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/service_worker/service_worker_registration.cc
index 0ccc2e40341d11a9da3e70b6527615385cf314ca..ae48d1dc0f889baa6052bc62e1d2a5c58ee1ed00 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -396,6 +396,8 @@ void ServiceWorkerRegistration::DidGetRegistrationsForClaimClients(
bool ServiceWorkerRegistration::ShouldClaim(
ServiceWorkerProviderHost* provider_host,
const std::vector<ServiceWorkerRegistrationInfo>& registrations) {
+ if (provider_host->IsHostToRunningServiceWorker())
+ return false;
if (provider_host->controlling_version() == active_version())
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698