Re: [w3c/ServiceWorker] Improve handling of extend lifetime promises (#1049)

@domenic, let me try to clarify the logic first (and then let's continue about the design):

> > will only wait on p and q but not r, which seems surprising.

I think it also will wait on r too. My intention was that when Handle Extend Lifetime Promise called in waitUntil goes async, `const r = p.then(doSomethingElse);` is run and queue the microtask for the doSomethingElse before the Handle Extend Lifetime Promise queues a microtask to chase p.

Referencing Promise.[[PromiseFulfillReactions]] from the internal spec algorithm seems hacky but I think the implementation also has to attach some kind of native handlers to catch and handle the then callbacks. Still looking for a better way to spec it but haven't found one yet.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1049#issuecomment-270806433

Received on Friday, 6 January 2017 01:23:42 UTC