Re: [whatwg/fetch] processResponseDone should receive a response (#1202)

@annevk commented on this pull request.



>   <li><p>Set <var>fetchParams</var>'s <a for="fetch params">request</a>'s
  <a for=request>done flag</a>.
 
+ <li><p>If <var>timingInfo</var> is null, then return.

Why do we have this here and also below in finalize and report timing? It seems this doesn't need to be here and you should get process response done either way?

>   <li><p>If <var>timingInfo</var> is null, then return.
 
- <li><p>If <var>response</var>'s <a for=response>timing allow passed flag</a> is not set, then set
- <var>timingInfo</var> to a new <a for=/>fetch timing info</a> whose
- <a for="fetch timing info">start time</a> and
- <a for="fetch timing info">post-redirect start time</a> are <var>timingInfo</var>'s
- <a for="fetch timing info">start time</a>.
+ <li>
+  <p>If <var>response</var>'s <a for=response>timing allow passed flag</a> is not set, then
+  perform the following steps:
+  <ol>

Newline before this.

>   <li><p>If <var>timingInfo</var> is null, then return.
 
- <li><p>If <var>response</var>'s <a for=response>timing allow passed flag</a> is not set, then set
- <var>timingInfo</var> to a new <a for=/>fetch timing info</a> whose
- <a for="fetch timing info">start time</a> and
- <a for="fetch timing info">post-redirect start time</a> are <var>timingInfo</var>'s
- <a for="fetch timing info">start time</a>.
+ <li>
+  <p>If <var>response</var>'s <a for=response>timing allow passed flag</a> is not set, then
+  perform the following steps:
+  <ol>
+    <li><p>Set <var>timingInfo</var> to a new <a for=/>fetch timing info</a> whose

Single-space indentation.

> @@ -4017,9 +4029,10 @@ steps:
 
  <li><p>Set <var>response</var>'s <a for="response">timing info</a> to <var>timingInfo</var>.
 
- <li><p><a href="https://github.com/w3c/resource-timing/pull/261">Mark resource timing</a> for
- <var>timingInfo</var>, <var>originalURL</var>, <var>initiatorType</var>, and <var>global</var>.
- <!-- TODO -->

Let's restore the TODO.

> @@ -7217,8 +7233,9 @@ method steps are:
    <li><p><a lt=terminated for=fetch>Terminate</a> the ongoing fetch with the aborted flag set.
   </ol>
 
- <li><p>Let <var>handleFetchDone</var> be to <a>finalize and report timing</a> with
- <var>response</var>, <var>globalObject</var>, and "<code>fetch</code>".
+ <li><p>Let <var>handleFetchDone</var> given <a for=/>response</a> <var>response</var> be to
+ <a>finalize and report timing</a> with <var>response</var>, <var>globalObject</var>, and
+ "<code>fetch</code>".

Oh sorry, this can be _response_ because _responseObject_ is used in the outer scope. And _response_ is used below, but only within the scope of those substeps.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1202#pullrequestreview-636504119

Received on Thursday, 15 April 2021 10:15:36 UTC