diff --git a/docs/index.bs b/docs/index.bs index b073ac13..22d83b0d 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -3263,15 +3263,17 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/ 1. Let |queue| be an empty [=queue=] of [=race result=]. 1. Let |raceFetchController| be null. 1. Let |raceResponse| be a [=race response=] whose [=race response/value=] is "pending". - 1. Run the following substeps [=in parallel=], but [=abort when=] |fetchController|'s [=fetch controller/state=] is "terminated" or "aborted": + 1. Run the following substeps [=in parallel=]: + 1. If |fetchController|'s [=fetch controller/state=] is "terminated" or "aborted", then set |raceResponse| to a [=race response=] whose [=race response/value=] is null, and 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. Set |raceResponse|'s [=race response/value=] to |raceNetworkRequestResponse|. - 1. If |raceNetworkRequestResponse|'s [=response/status=] is [=ok status=], then: - 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: - 1. [=fetch controller/Abort=] |raceFetchController|. - 1. Set |raceResponse| to a [=race response=] whose [=race response/value=] is null. + 1. Run these steps, but [=abort when=] |fetchController|'s [=fetch controller/state=] is "terminated" or "aborted". + 1. Set |raceResponse|'s [=race response/value=] to |raceNetworkRequestResponse|. + 1. If |raceNetworkRequestResponse|'s [=response/status=] is [=ok status=], then: + 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: + 1. [=fetch controller/Abort=] |raceFetchController|. + 1. Set |raceResponse| to a [=race response=] whose [=race response/value=] is null. 1. Resolve |preloadResponse| with undefined. 1. Run the following substeps [=in parallel=]: 1. Let |fetchHandlerResponse| be the result of [=Create Fetch Event and Dispatch=] with |request|, |registration|, |useHighResPerformanceTimers|, |timingInfo|, |workerRealm|, |reservedClient|, |preloadResponse|, and |raceResponse|.