[ServiceWorker] Clients.claim() does not deal with a client already controlled by another registration (#682)

Consider a page located at /a/b/c/d.html

1. Register SW for /a
2. Load d.html -> d is controlled by /a
3. Register another SW for /a/b. Now d is still controlled by /a but the 'matching registration for scope' will be '/a/b'
4. Register another SW for '/a/b/c'. This SW calls claim() in onactivate.
    At this point, we should first run Handle Service Worker Client Unload steps with the client, then change the client's active worker. The former is not being done right now.

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

Received on Friday, 17 April 2015 20:23:49 UTC