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

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

Issue 717353004: ServiceWorker: Add support for .skipWaiting and controllerchange event(2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 6 years 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
Index: content/browser/service_worker/service_worker_register_job.cc
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index b68cd30f8199d6812f9ace3a66c4f1534cb5e43d..66400527bb7d13c0f0f2cfe3da5085f193e9fadf 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -426,10 +426,9 @@ void ServiceWorkerRegisterJob::OnStoreRegistrationComplete(
// and "installed" as the arguments."
new_version()->SetStatus(ServiceWorkerVersion::INSTALLED);
- // TODO(michaeln): "13. If activateImmediate is true, then..."
-
- // "14. Wait until no document is using registration as their
- // Service Worker registration."
+ // "If registration's waiting worker's skip waiting flag is set:" then
+ // activate the worker immediately otherwise "wait until no service worker
+ // client is using registration as their service worker registration."
registration()->ActivateWaitingVersionWhenReady();
Complete(SERVICE_WORKER_OK);

Powered by Google App Engine
This is Rietveld 408576698