- From: Jeffrey Yasskin <notifications@github.com>
- Date: Fri, 13 Feb 2015 11:41:35 -0800
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Friday, 13 February 2015 19:42:05 UTC
[Upon fulfillment](http://www.w3.org/2001/tag/doc/promises-guide#upon-fulfillment) doesn't use the result of `p.then`, so the embedded `return` will be ignored, rather than leading to the fulfillment of the result of `addAll()`. This is another case where we want to wait for a promise to settle rather than doing anything asynchronously (https://github.com/w3ctag/promises-guide/issues/36), but here you could use [the WebIDL "perform some steps once a promise is settled" algorithm](https://heycam.github.io/webidl/#dfn-perform-steps-once-promise-is-settled). The WebIDL algorithm will also solve the problem that if any element of `responseBodyPromiseArray` rejects, that doesn't propagate to the result of `addAll()`. --- Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/commit/5aa0ca22a948cdb6934e79a5a7750adaec859f44#commitcomment-9742848
Received on Friday, 13 February 2015 19:42:05 UTC