- From: Ben Kelly <notifications@github.com>
- Date: Tue, 23 Aug 2016 12:02:52 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Tuesday, 23 August 2016 19:03:23 UTC
> But will throwing inside .waitUntil() make install to fail?
As long as it triggers a promise rejection, yes.
I guess we should clarify what this does:
```
void broken() {
return new Promise((resolve, reject) => {
setTimeout(_ => {
throw new Error('boom');
resolve();
}, 0);
});
}
evt.waitUntil(broken());
```
Here, the promise never resolves or rejects. Eventually it will be killed by the browser for taking too long. I think this should probably be treated as a rejection. I'm not 100% sure what we do today.
--
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/issues/896#issuecomment-241841535
Received on Tuesday, 23 August 2016 19:03:23 UTC