[w3c/ServiceWorker] Improve.ready and Activate (#1277)

Before this change, .ready method was waiting for the change of the
state of the regisration's active worker without being synchronized with
the steps that set the corresponding ServiceWorkerRegistration object's
active ServiceWorker object's state.

This changes both .ready and Activate such that .ready tries to resolve
the ready promise, if pending, and just returns. And Activate resolves
pending ready promises after updating active ServiceWorker object's
state.

Fixes #1011
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/ServiceWorker/pull/1277

-- Commit Summary --

  * Improve.ready and Activate

-- File Changes --

    M docs/index.bs (29)
    M docs/v1/index.bs (29)

-- Patch Links --

https://github.com/w3c/ServiceWorker/pull/1277.patch
https://github.com/w3c/ServiceWorker/pull/1277.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1277

Received on Friday, 9 February 2018 08:01:17 UTC