[w3c/ServiceWorker] .ready promise should be resolved after updating registration.state properties (#1011)

The steps for resolving the .ready promise contain the following (section 3.4.2):
> If registration’s active worker is null, wait until registration’s active worker changes.
>> Implementers should consider this condition is met when the corresponding registration request >> gets to the step 6 of Activate algorithm.

However, both step 5 and step 6 from Activate algorithm use queues to make changes to the ServiceWorkerRegistration objects and dispatching statechange events.

This may lead to situations where the ready promise is resolved before registration.active is updated.

-- 
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/issues/1011

Received on Tuesday, 22 November 2016 16:50:58 UTC