Re: [w3c/ServiceWorker] Add race-network-and-cache source to static routing api. (PR #1764)

@yoshisatoyanagisawa commented on this pull request.



> +                    1. If |fetchController|'s [=fetch controller/state=] is "<code>terminated</code>" or "<code>aborted</code>", then abort these steps.
+                    1. Set |raceFetchController| to the result of calling [=fetch=] given |request|, with [=fetch/processResponse=] set to the following steps given a [=/response=] |raceNetworkRequestResponse|:
+                        1. Run these steps, but [=abort when=] |fetchController|'s [=fetch controller/state=] is "<code>terminated</code>" or "<code>aborted</code>".
+                            1. Let |raceNetworkResult| be a [=race result=] whose [=race result/routed response=] is |raceNetworkRequestResponse| and [=race result/used route=] is {{RouterSourceEnum/"network"}}.
+                            1. [=queue/Enqueue=] |raceNetworkResult| to |queue|.
+                        1. [=If aborted=] and |raceFetchController| is not null, then [=fetch controller/Abort=] |raceFetchController|.
+                1. Resolve |preloadResponse| with undefined.
+                1. Run the following substeps [=in parallel=]:
+                    1. Set |timingInfo|’s [=service worker timing info/worker cache lookup start=] to the [=coarsened shared current time=] given |useHighResPerformanceTimers|.
+                    1. Let |environment| be null.
+                    1. If |request| is a <a>non-subresource request</a>, then:
+                        1. Set |environment| to |reservedClient|.
+                    1. Else:
+                        1. Set |environment| to |client|.
+                    1. Let |caches| be the result of running [=obtain a local storage bottle map=] with |environment| and "<code>caches</code>".
+                    1. [=map/For each=] |raceNetworkAndCacheCacheName| &#x2192; |cache| of |caches|.

It is fine to say`|cacheName|` instead of `|raceNetworkAndCacheCacheName|` because `|cacheName| -> |cache|` refers the key & value pairs inside `caches`.

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

Message ID: <w3c/ServiceWorker/pull/1764/review/3709378069@github.com>

Received on Tuesday, 27 January 2026 06:43:43 UTC