- From: Jungkee Song <notifications@github.com>
- Date: Tue, 10 Jan 2017 18:28:40 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 11 January 2017 02:29:12 UTC
In the following snippet for example: ```js addEventListener('push', e => { let outResolve; let p = new Promise(resolve => { outResolve = resolve; }); e.waitUntil(p); // Upon fulfillment/rejection of p inside p.then(() => { e.waitUntil(q); }); setTimeout(() => outResolve(), 1); }); ``` I think the "Upon fulfillment/rejection of p" triggered inside of `waitUntil()` queues (precisely, it appends the reaction to p.[[PromiseFulfillReactions]] as p is pending) the dcrease job before the promise job for `e.waitUntil(q);` is queued, which makes `e.waitUntil(q);` throws. -- 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-271760589
Received on Wednesday, 11 January 2017 02:29:12 UTC