Re: [ServiceWorker] The "uninstalling flag" check in ServiceWorkerRegistration.update() should be moved to the Update algorithm (#807)

I think it would be better to remove the additional checks in update() and Soft Update.

Consider:

1) Registration has its uninstalling flag set.
2) A new register job is pending in the queue.  This will clear the uninstalling flag when it runs.
3) update() is called

Leaving the checks in place will cause the update() call here to be racey.  If update() is called before the register job runs, then it will abort.  If its called after the register job is run then the update will be executed.

In contrast, if we remove the synchronous uninstalling flag checks, then we always get the same behavior.  The update job always execute because the register job clears the flag.

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

Received on Tuesday, 5 January 2016 14:44:00 UTC