Skip to content

Commit

Permalink
Use [=lookup-race-response=]
Browse files Browse the repository at this point in the history
  • Loading branch information
sisidovski committed Feb 15, 2024
1 parent f7809ff commit 3b11f70
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1724,10 +1724,6 @@ is "<code>all</code>" or "<code>none</code>". Unless stated otherwise it is "<co
</dl>
</div>

<p>A <a for=/>request</a> has an associated <dfn for=request export>service-workers race token</dfn> (a string). Unless stated otherwise it is null.

<p class=note>This is only set by <a for=/>handle fetch</a> in service workers.

<p>A <a for=/>request</a> has an associated
<dfn export for=request id=concept-request-initiator>initiator</dfn>, which is
the empty string,
Expand Down Expand Up @@ -4510,6 +4506,9 @@ steps:

<li><p>If <var>recursive</var> is false, then run the remaining steps <a>in parallel</a>.

<li><p>Let |raceReesponse| be the result of [=lookup-race-response=].
<li><p>If |raceReesponse| is <var>response</var>, return |raceReesponse|.

<li>
<p>If <var>response</var> is null, then set <var>response</var> to the result of running the steps
corresponding to the first matching statement:
Expand All @@ -4527,22 +4526,6 @@ steps:
<li><p>Return <var>fetchParams</var>'s <a for="fetch params">preloaded response candidate</a>.
</ol>

<dt><var>request</var>'s <a for=request>service-workers race token</a> is not null
<dd>
<ol>
<li><p>Let <var>raceReesponse</var> to the result of [=lookup-race-response=] given <var>request</var>'s <a for=request>service-workers race token</a>, <var>request</var>'s <a for=request>reserved client</a>, <var>request</var>'s <a for=request>URL</a>.
<li><p>If <var>raceReesponse</var> is non-null, then:
<ol>
<li><p>Wait until <var>raceReesponse</var> settles.
<li><p>If <var>raceReesponse</var> resolves with <var>response</var>, then:
<ol>
<li><p><a for=/>Assert</a>: <var>response</var> is a <a for=/>response</a>.
<li><p>Return <var>response</var>.
</ol>
<li><p>If <var>raceReesponse</var> rejects, return a <a>network error</a>.
</ol>
</ol>

<dt><var>request</var>'s <a for=request>current URL</a>'s <a for=url>origin</a> is
<a>same origin</a> with <var>request</var>'s <a for=request>origin</a>, and <var>request</var>'s
<a for=request>response tainting</a> is "<code>basic</code>"
Expand Down

0 comments on commit 3b11f70

Please sign in to comment.