Re: [slightlyoff/ServiceWorker] Install algorithm step 14 should clear waiting worker before updating state to redundant (#851)

Part of my issue with doing these as microtasks is now we are firing the events as microtasks as well.

Also, one of the goals of the task queueing change was to be able to reason about the order of events and changes on the different threads.  If some things happen via tasks and others via microtasks it gets very difficult to figure out what happens when.  As I understand it, queuing these as microtasks can make them fire before other queued tasks.

This changes a lot of timing in the spec just to accommodate one promise getting resolved.  It just seems safer to me to resolve the promise in a task.  Script won't be able to tell anyway since we're already in a task.  If implementations want to optimize this out in an equivalent way, thats fine.  But they would have to ensure the sane ordering of events.

---
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/851#issuecomment-215121917

Received on Wednesday, 27 April 2016 15:32:19 UTC