Re: [whatwg/fetch] Set body with byte reading support (PR #1593)

@annevk commented on this pull request.



> +
+  <ol>
+   <li>Let |promise| be [=a new promise=].
+
+   <li>Return |promise| and run the remaining steps [=in parallel=].
+
+   <li>If |buffer| is empty and the ongoing fetch is [=fetch/suspend|suspended=],
+   [=fetch/resumed|resume=] the fetch.
+
+   <li>Wait until |buffer| is not empty.
+
+   <li>Let |available| be the size of |buffer|.
+
+   <li>Let |desiredSize| be |available|.
+
+   <li>If |stream|'s [=ReadableStream/current BYOB request view=] is non-null, then set

I think it makes sense to do the right thing where we can, but I also don't mind if we take shortcuts when it cannot be observed. Although at some point we'll have to clean it all up.

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

Message ID: <whatwg/fetch/pull/1593/review/1284974911@github.com>

Received on Monday, 6 February 2023 10:59:38 UTC