Re: [slightlyoff/ServiceWorker] More clarity around waiting for an active worker to finish (#916)

It seems like waiting for events to clear is essentially creating a new state.

Can we instead just restructure things such that:

1. Normal criteria for going active is no controlled documents and no events being processed.
2. Calling skipWaiting bypasses the controlled document requirement, but we still defer going active until all outstanding events are done.

This lets us use the existing wait mechanism without inventing a new one.

Only real downside is we don't fire new events on soon-to-be-active worker, but I don't think that should really break anything.  It's just like getting update slightly later.

Thoughts?

---
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/916#issuecomment-226854051

Received on Friday, 17 June 2016 19:02:47 UTC