Re: [whatwg/fetch] Move `finalize and report timing` to controller (PR #1413)

Thanks, these simplifications have helped my understanding. I still have some high-level comments here before going into the details.

1. There's at least two other places that create a fetch params and they don't pass in a controller:
   * https://fetch.spec.whatwg.org/#ref-for-fetch-params%E2%91%A0%E2%91%A0 (HTTP-network-or-cache fetch)
   * https://fetch.spec.whatwg.org/#ref-for-fetch-params%E2%91%A0%E2%91%A2 (CORS-preflight fetch)
2. I'm starting to wonder why the fetch algorithm does not get to call conclude on the same task that sets the "done flag". Any additional metadata required could be passed in on the request concept.
3. I'm not sure I understand your last comment in https://github.com/whatwg/fetch/pull/1413#discussion_r854322363 but it seems we now ended up with "body info" as the struct name, but the struct members still duplicate part of that name. Could you perhaps try another explanation how this new struct avoids issues in the future? I'm still not entirely sold on it.
4. Why do both the controller and fetch params hold access to timing info? I think we should deduplicate that to avoid confusion, no? But also, if we do 2 then the controller might not have to hold timing info at all.

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

Message ID: <whatwg/fetch/pull/1413/c1135645818@github.com>

Received on Tuesday, 24 May 2022 09:28:28 UTC