Re: [ServiceWorker] Soft Update and Register can race when setting registration scriptURL (#789)

In Chrome, register jobs triggered by register(script_url) are marked with script_url when scheduled, and update jobs triggered by Soft Update or update() are marked with the newest worker's URL when scheduled. When an update job runs, if the newest worker's URL has changed from the one the job was marked with, it aborts. When a register runs, if the newest worker's URL has NOT changed, the job aborts (usually... if the registration was uninstalling it cancels that and it can also promote waiting -> active if there's no active worker but that's an impl detail). Otherwise, it performs an update with the script URL it was marked with.

I think that's almost what you propose, except that in your proposal update job wouldn't be marked with a URL when scheduled, and would instead simply take the newest worker URL once the job actually begins.


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

Received on Tuesday, 24 November 2015 06:09:57 UTC