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

@domenic commented on this pull request.



> +                  1. Wait until any of the following are true:
+                      1. |queue| is not empty.
+                      1. Both |networkFetchCompleted| and |cacheLookupCompleted| are true.

```suggestion
                  1. Wait until any of the following are true:
                      * |queue| is not empty; or
                      * both |networkFetchCompleted| and |cacheLookupCompleted| are true.
```

> @@ -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|.
-                  1. Wait until |queue| is not empty.
+                      1. Set |fetchHandlerCompleted| to true.
+                  1. Wait until any of the following are true:
+                      1. |queue| is not empty.
+                      1. Both |networkFetchCompleted| and |cacheLookupCompleted| are true.
+                  1. If |queue| is empty, then:
+                      1. If |raceResponse|'s [=race response/value=] is a [=/response=], return |raceResponse|'s [=race response/value=].
+                      1. If |raceResponse|'s [=race response/value=] is a [=network error=], return a [=network error=].
+                  1. Return null.

This should probably be indented?

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

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

Received on Wednesday, 11 June 2025 02:42:12 UTC