ServiceWorker: Update the install sequence as per the latest spec
commit8148543da0da6062980504f2851afb69e4bdaa4f
authornhiroki <nhiroki@chromium.org>
Mon, 1 Sep 2014 06:11:47 +0000 (31 23:11 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 1 Sep 2014 06:15:29 +0000 (1 06:15 +0000)
tree75354084981bc7ffe4a71dc8c33b0f86f0935d6b
parentee85a1188ee2454e62dc24c58477df39970a990b
ServiceWorker: Update the install sequence as per the latest spec

This change...

(a) updates the install sequence based on the latest spec. Before this
patch, the installing version is set after resolving the register promise.
After this patch, the installing version is set before resolving the promise.

(b) fills registration's version attributes before resolving the register
promise. This should fix the problem mentioned c#5 in the issue and should
absorb the change of the timing to set the installing version due to (a).

(c) adds a separate IPC for updatefound event to adjust the timing to fire
the event. Before this patch, the event shares SetVersionAttributes message.

Blink: https://codereview.chromium.org/524193003/
[2] Chromium: THIS PATCH
Blink: https://codereview.chromium.org/517223002/
Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#installation-algorithm

BUG=406240
TEST=content_unittests --gtest_filter=ServiceWorker*
TEST=run_webkit_tests.py http/tests/serviceworker/

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

Cr-Commit-Position: refs/heads/master@{#292838}
14 files changed:
content/browser/service_worker/service_worker_dispatcher_host.cc
content/browser/service_worker/service_worker_job_unittest.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_registration_handle.cc
content/browser/service_worker/service_worker_registration_handle.h
content/browser/service_worker/service_worker_registration_unittest.cc
content/child/service_worker/service_worker_dispatcher.cc
content/child/service_worker/service_worker_dispatcher.h
content/child/service_worker/service_worker_message_filter.cc
content/child/service_worker/service_worker_message_filter.h
content/child/service_worker/web_service_worker_impl.cc
content/common/service_worker/service_worker_messages.h