Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ The following abstract operations operate on {{ReadableStream}} instances at a h
1. Perform ! [$InitializeReadableStream$](|stream|).
1. Let |controller| be a [=new=] {{ReadableByteStreamController}}.
1. Perform ? [$SetUpReadableByteStreamController$](|stream|, |controller|, |startAlgorithm|,
|pullAlgorithm|, |cancelAlgorithm|, 0, undefined).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value 0 matches what the reference implementation does, and the reference implementation passes the tests.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I did not realize that ReadableStreamDefaultControllerShouldCallPull ReadableByteStreamControllerShouldCallPull return early to so that when strategyHWM = 0, then no queuing is used. That is a very nice feature.

|pullAlgorithm|, |cancelAlgorithm|, 1, undefined).
1. Return |stream|.

<p class="note">This abstract operation will throw an exception if and only if the supplied
Expand Down Expand Up @@ -6459,7 +6459,7 @@ abstract operations are used to implement these "cross-realm transforms".
1. Otherwise, return [=a promise resolved with=] undefined.
1. Let |sizeAlgorithm| be an algorithm that returns 1.
1. Perform ! [$SetUpReadableStreamDefaultController$](|stream|, |controller|, |startAlgorithm|,
|pullAlgorithm|, |cancelAlgorithm|, 0, |sizeAlgorithm|).
|pullAlgorithm|, |cancelAlgorithm|, 1, |sizeAlgorithm|).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the SetUpCrossRealmTransformReadable abstract operation, not the ReadableStreamDefaultTee abstract operation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, you’re right.


<p class="note">Implementations are encouraged to explicitly handle failures from the asserts in
this algorithm, as the input might come from an untrusted context. Failure to do so could lead to
Expand Down