Service Worker: in Unregister, wait until after the active worker no longer controls...
commit058c5f7210c5c55e919f685e43c359d9ed6edda5
authorfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 12 Aug 2014 15:54:43 +0000 (12 15:54 +0000)
committerfalken@chromium.org <falken@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 12 Aug 2014 15:56:31 +0000 (12 15:56 +0000)
tree24579992b74aa00e15acb33f8d28988f4a7e2f95
parent94a2ca7d03a06ec1e6b9f6593d70687c63db7403
Service Worker: in Unregister, wait until after the active worker no longer controls a document

As per spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#unregister-algorithm

Unregister shouldn't doom the active worker or delete the registration until
the active worker no longer controls a document. This means that if register()
is called before that happens, the unregistration is effectively canceled.

BUG=388095
TEST=https://codereview.chromium.org/416003003/

Review URL: https://codereview.chromium.org/413063004

Cr-Commit-Position: refs/heads/master@{#288994}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288994 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/service_worker/service_worker_database.cc
content/browser/service_worker/service_worker_register_job.cc
content/browser/service_worker/service_worker_registration.cc
content/browser/service_worker/service_worker_registration.h
content/browser/service_worker/service_worker_storage.cc
content/browser/service_worker/service_worker_storage.h
content/browser/service_worker/service_worker_unregister_job.cc
content/browser/service_worker/service_worker_unregister_job.h