Re: [ServiceWorker] Race when registering multiple service workers for the same scope (#783)

> 4) The second Update job is popped off the update queue. It still just sees the script A active worker as the newest worker, so thinks its ok to update with script A. It also queues an Install job, but with script A.

The current behavior in the spec is the second job will replace the first job. That is in the example above, when the second update job gets in the synchronized steps, it'll replace the current installing worker in the first place by terminating the executing installing worker. Then, this update job will continue and advance to the Install phase if the conditions are all met. The terminated installing worker will get redundant in the Install step 16. I think I missed to pop the top element from the queue in this error case. Will double check it.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/783#issuecomment-164964610

Received on Wednesday, 16 December 2015 02:15:50 UTC