Re: [w3c/ServiceWorker] WIP: Handing fetch termination (#1178)

annevk commented on this pull request.



> @@ -2996,6 +2997,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
               1. If |e|'s [=FetchEvent/respond-with error flag=] is set, set |handleFetchFailed| to true.
               1. Else, set |response| to |e|'s [=FetchEvent/potential response=].
           1. If |e|'s <a>canceled flag</a> is set, set |eventCanceled| to true.
+          1. Run the following steps [=in parallel=]:
+              1. Wait for the fetch to become [=fetch/terminated=].
+              1. [=Queue a task=] to [=AbortSignal/signal abort=] on |requestObject|'s [=Request/signal=].

I tried to think about this a bit and the way XMLHttpRequest seems to approach is that you always get a response from the fetch process, but it might be a network error annotated with a termination reason. And for the request/response bodies we got the stream that errors.

-- 
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/1178#discussion_r131621460

Received on Monday, 7 August 2017 10:26:41 UTC