You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Let |potentialResponse| be a copy of |response|'s associated [=Response/response=], except for its [=response/body=].
1438
1438
1. If |response|'s [=response/body=] is non-null, run these substeps:
1439
1439
1. Let |reader| be the result of <a lt="get a reader">getting a reader</a> from |response|'s [=response/body=]'s <a>stream</a>.
1440
-
1. Let |strategy| be an object created in |targetRealm|. The user agent may choose any object.
1440
+
1. Let |highWaterMark| be a non-negative, non-NaN number, chosen by the user agent.
1441
+
1. Let |sizeAlgorithm| be an algorithm that accepts a [=chunk=] object and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.
1441
1442
1. Let |pull| be an action that runs these subsubsteps:
1442
1443
1. Let |promise| be the result of <a lt="read a chunk">reading a chunk</a> from |response|'s [=response/body=]'s <a>stream</a> with |reader|.
1443
1444
1. When |promise| is fulfilled with an object whose <code>done</code> property is false and whose <code>value</code> property is a <code>Uint8Array</code> object, append the bytes represented by the <code>value</code> property to |bytes| and perform ! <a>DetachArrayBuffer</a> with the <code>ArrayBuffer</code> object wrapped by the <code>value</code> property.
1444
1445
1. When |promise| is fulfilled with an object whose <code>done</code> property is true, set |end-of-body| to true.
1445
1446
1. When |promise| is fulfilled with a value that matches with neither of the above patterns, or |promise| is rejected, [=ReadableStream/error=] |newStream| with a <code>TypeError</code>.
1446
1447
1. Let |cancel| be an action that [=ReadableStream/cancels=] |response|'s [=response/body=]'s <a>stream</a> with |reader|.
1447
-
1. Let |newStream| be the result of [=ReadableStream/construct a ReadableStream object=] with |strategy|, |pull| and |cancel| in |targetRealm|.
1448
+
1. Let |newStream| be the result of [=ReadableStream/construct a ReadableStream object=] with |highWaterMark|, |sizeAlgorithm|, |pull|, and |cancel| in |targetRealm|.
1448
1449
1. Set |potentialResponse|'s [=response/body=] to a new [=/body=] whose <a>stream</a> is |newStream|.
1449
1450
1. Run these subsubsteps repeatedly <a>in parallel</a> while |done| is false:
1450
1451
1. If |newStream| is <a>errored</a>, then set |done| to true.
0 commit comments