Re: [w3c/ServiceWorker] Reuse network response on both network and fetch handler failed (PR #1777)

@yoshisatoyanagisawa commented on this pull request.



> @@ -3282,6 +3287,15 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
                   1. Wait until |queue| is not empty.
                   1. Let |result| be the result of [=dequeue=] |queue|.
                   1. Let |routedResponse| be |result|'s [=race result/routed response=].
+                  1. If |routedResponse| is null or a [=network error=], then:

PTAL
After reading `Create Fetch Event And Dispatch`, I noticed that |raceResponse| is plumbed there.  I mean if the fetch handler returned without calling `respondWith()`, |raceResponse|'s `value` is returned instead.

Exception is that `event.preventDefault()` is called inside, and I found that |timingInfo| is not passed at that time.  This PR also fixes that.

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

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

Received on Thursday, 12 June 2025 10:30:54 UTC