diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7102b5b0..58c4b817 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 with: submodules: true - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: node-version: 18 - run: npm install diff --git a/index.bs b/index.bs index 9e437f4c..c116490b 100644 --- a/index.bs +++ b/index.bs @@ -654,9 +654,8 @@ enum ReadableStreamType { "bytes", "owning" };

Can be set to "owning" to signal that the constructed {{ReadableStream}} will own chunks (via transfer or serialization) before enqueuing them. This ensures that enqueued chunks are not mutable by the source. - Transferred or serialized chunks may have dispose steps which are executed if - enqueued chunks are dequeued without being provided to the application, for instance when - a {{ReadableStream}} is errored. + Chunks may have dispose steps which are executed if enqueued chunks are dequeued + without being provided to the application, for instance when a {{ReadableStream}} is errored.

Setting any value other than "{{ReadableStreamType/bytes}}", "{{ReadableStreamType/owning}}" @@ -6779,6 +6778,7 @@ mark=] is greater than zero. 1. If |stream|.[=ReadableStream/[[controller]]=] [=implements=] {{ReadableStreamDefaultController}}, + 1. If |transferList| is null, set |transferList| to an [=list/is empty|empty=] list. 1. Perform ! [$ReadableStreamDefaultControllerEnqueue$](|stream|.[=ReadableStream/[[controller]]=], |chunk|, |transferList|). 1. Otherwise, diff --git a/reference-implementation/lib/ReadableStreamDefaultController-impl.js b/reference-implementation/lib/ReadableStreamDefaultController-impl.js index 35375ca6..8abc763d 100644 --- a/reference-implementation/lib/ReadableStreamDefaultController-impl.js +++ b/reference-implementation/lib/ReadableStreamDefaultController-impl.js @@ -18,7 +18,7 @@ exports.implementation = class ReadableStreamDefaultControllerImpl { } enqueue(chunk, options) { - const transferList = options ? options.transfer : []; + const transferList = options.transfer; if (transferList.length && !this._isOwning) { throw new TypeError('The stream is not an owning stream and cannot make use of options'); }