Re: [w3c/ServiceWorker] Isolate fix for race-network-and-fetch-handler stall from PR #1764 (PR #1777)

@yoshisatoyanagisawa commented on this pull request.



> @@ -3279,7 +3282,14 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
                       1. If |fetchHandlerResponse| is not null and not a [=network error=], and |raceFetchController| is not null, [=fetch controller/abort=] |raceFetchController|.
                       1. Let |raceFetchHandlerResult| be a [=race result=] whose [=race result/routed response=] is |fetchHandlerResponse| and [=race result/used route=] is {{RouterSourceEnum/"fetch-event"}}.
                       1. [=queue/Enqueue=] |raceFetchHandlerResult| to |queue|.

I think it is a matter of the design.  If we go with that design, the logic after dequeue will be:
1. checks for the response is ok or not.
2. if not assuming the network error, and wait for the fetch handler to finish.
3. replace the response if the fetch handler success.

With this way, we can use fetch handler result on fetch handler succeeded but network failed.  Do you prefer writing like so?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1777#discussion_r2139516970
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1777/review/2916134131@github.com>

Received on Wednesday, 11 June 2025 08:23:01 UTC