[ServiceWorker] Describe waitUntil() behavior in terms of Promise.all() (#738)

It seems to me like waitUntil() can be significantly simplified if it uses Promise.all that is now in the ES spec.

While the event is dispatching (since waitUntil() can't be called when async), every promise passed to it is appended to an array. At the end of the dispatch wait on Promise.all(list of promises). That way we get 'rejection gets priority' for free.

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

Received on Friday, 21 August 2015 22:24:08 UTC