[ServiceWorker] skipWaiting() on an installed worker should abort Install step "Wait until no service worker client is using registration." (#594)

This was inspired by a question on Blink's intent to ship thread for skipWaiting: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IEMjiDBuMRk/-Ok7wd_Xu7QJ

I'm not sure there's a material bug here, but it might be cleaner to explicitly deal with it. Consider the sequence:
1. Register a worker while there's an active worker with a controllee.
2. The worker installs and reaches Install step "Wait until no service worker client is using registration"
3. The worker calls skipWaiting(). skipWaiting invokes the Activate algorithm.

Now the worker is activated but still waiting in Install. When it's done waiting, it will invoke the Activate algorithm again. Probably skipWaiting() should abort that waiting step... though I guess there is no harm in re-entering Activate.

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

Received on Wednesday, 17 December 2014 13:33:09 UTC