Re: [ServiceWorker] unregister() then register() same-scope, different script URL that fails: what do you expect to happen? (#396)

@nikhilm Regarding the case of:
```
register("a.js")
register("b.js")
```

My reading of the spec is once "a.js" enters Update 4.3, "b.js" is free to enter Update 4.1 and it will now be the top element, so it proceeds to block on "a.js" exiting Update 4.3 since it is atomic. Once "a.js" exits Update 4.3, it enters Update 4.4 (Install) but in parallel "b.js" can enter Update 4.3 and also proceed to Update 4.4. So they both end up in Install, but "a.js" enters the atomic Install 4 first at which point it becomes "installing". Once it exits Install 4, "b.js" can enter Install 4 and which point it terminates "a.js". If I understand correctly, another possible sequence is "a.js" proceeds to finish install and activate before "b.js" enters Install 4; i.e., the spec allows racing here. Blink does the termination case (and is careful to do so only after "a.js" exits Install 4), which I think is OK per spec?

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

Received on Wednesday, 11 February 2015 09:45:05 UTC