whatwg / streams

Streams Standard
https://streams.spec.whatwg.org/
Other
1.35k stars 160 forks source link

Editorial: call correct Release() depending on chosen reader in pipeTo() #1209

Closed MattiasBuelens closed 2 years ago

MattiasBuelens commented 2 years ago

The user agent is allowed to use a default reader or a BYOB reader for the pipe in step 8, but we always call ReadableStreamDefaultReaderRelease in the finalize steps. 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.)


Preview | Diff