ServiceWorker: Ensure live registration during starting worker
commitee784d496646d55da6395f8fda44fd2c52825e7e
authornhiroki <nhiroki@chromium.org>
Fri, 13 Mar 2015 10:14:51 +0000 (13 03:14 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 13 Mar 2015 10:16:11 +0000 (13 10:16 +0000)
tree99ab7e95a2e80c77f8ba7ea3a495f756722eb6c0
parentd1e0aa2e708ac4be98b119d4b936723285a1cc7d
ServiceWorker: Ensure live registration during starting worker

Starting service worker requires a reference to the live registration in
order to expose a registration object within SWGlobalScope but no one has
ensured the liveness of the registration during the startup sequence.

This CL makes SWVersion to ensure the live registration during the period.

BUG=465254
TEST=content_browsertests --gtest_filter=ServiceWorkerVersionBrowserTest.*
TEST=content_unittests --gtest_filter=ServiceWorkerVersion*

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

Cr-Commit-Position: refs/heads/master@{#320477}
content/browser/service_worker/service_worker_browsertest.cc
content/browser/service_worker/service_worker_dispatcher_host.cc
content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
content/browser/service_worker/service_worker_handle_unittest.cc
content/browser/service_worker/service_worker_storage.h
content/browser/service_worker/service_worker_url_request_job_unittest.cc
content/browser/service_worker/service_worker_version.cc
content/browser/service_worker/service_worker_version.h
content/browser/service_worker/service_worker_version_unittest.cc