- From: Tab Atkins Jr. <notifications@github.com>
- Date: Mon, 02 Mar 2015 11:37:24 -0800
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Monday, 2 March 2015 19:37:54 UTC
I'm imagining that the resolving behavior for `FetchPromise` creates a no-op cancel when the argument is not a `FetchPromise`, but when it is, it properly sets up a chaining cancel. So the `FetchPromise` created by `.then()` resolves with the result of fetch, and chains its cancel from it. As long as nothing else chains off of the `fetch()` result, the ref-count will be 1, so when you call `p.cancel()` it'll chain up and cancel the `fetch()` result as well. (Sorry, I thought this was obvious; otherwise chaining cancellable things doesn't work at all, in any circumstance.) --- Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/625#issuecomment-76794071
Received on Monday, 2 March 2015 19:37:54 UTC