[ServiceWorker] What is the "Doom Installing Worker" algorithm supposed to be doing? (#847)

Can someone tell me what the "Doom Installing Worker" algorithm is supposed to be doing?

  https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#doom-installing-worker-algorithm

As far as I can tell its run in parallel with a job from the "Run Job" algorithm.  This seems somewhat insane to me since they are both manipulating the job queue.  Isn't it incredibly racy to assume the job itself lives beyond the life of "Doom Installing Worker"?

Also, what is the purpose of the loop over the remaining items in the job queue?  It seems its trying to somehow early abort the in-parallel job iff its a register job and there is another register later in the queue.

Can we instead simply put these steps in the register job?  That would avoid races and be a lot easier to understand.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/847

Received on Tuesday, 15 March 2016 20:36:39 UTC