[whatwg/streams] Editorial: call correct Release() depending on chosen reader in pipeTo() (PR #1209)

The user agent is allowed to use a default reader *or* a BYOB reader for the pipe in [step 8](https://streams.spec.whatwg.org/commit-snapshots/3c6b8b3570cbe51be1f58f7140f612e521197d85/#readable-stream-pipe-to), but we always call `ReadableStreamDefaultReaderRelease` in [the finalize steps](https://streams.spec.whatwg.org/commit-snapshots/3c6b8b3570cbe51be1f58f7140f612e521197d85/#rs-pipeTo-finalize). This is incorrect: we should use the appropriate `Release()` abstract op corresponding to the chosen reader. This PR fixes that.

(Before #1168, we had a single `ReadableStreamReaderGenericRelease` that worked for both. So this was a small regression.)

<!--
Thank you for contributing to the Streams Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.
-->

- [ ] At least two implementers are interested (and none opposed):
   * …
   * …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * …
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chrome: …
   * Firefox: …
   * Safari: …

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/streams/pull/1209


-- Commit Summary --

  * Ensure pipeTo() calls the correct Release() depending on the chosen reader

-- File Changes --

    M index.bs (4)

-- Patch Links --

https://github.com/whatwg/streams/pull/1209.patch

https://github.com/whatwg/streams/pull/1209.diff


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1209

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/pull/1209@github.com>

Received on Tuesday, 18 January 2022 23:29:30 UTC