-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pipeThough() non-generic? #961
Comments
I'm fine with this, because I've generally come to regret all these gratuitous differences with most web-based specs. See #963 for the larger discussion there. If we do pursue #963, implementations may want to bundle this change in with the many other small tweaks that would be involved, so as to minimize any transition pain from web sites depending on the current semantics. But, we could also do this independently ahead of time. |
Require pipeThrough() to be called on a ReadableStream. Stop delegating to this.pipeTo(). Also throw exceptions if *this* or _writable_ are not streams or they are locked, or if *signal* is not an AbortSignal. Also require _readable_ to be a ReadableStream. Add a new abstract operation, ReadableStreamPipeTo(), which is used internally by pipeTo() and pipeThrough() and also can be referenced from other standards. Closes whatwg#961.
Require pipeThrough() to be called on a ReadableStream. Stop delegating to this.pipeTo(). Also throw exceptions if *this* or _writable_ are not streams or they are locked, or if *signal* is not an AbortSignal. Also require _readable_ to be a ReadableStream. Add a new abstract operation, ReadableStreamPipeTo(), which is used internally by pipeTo() and pipeThrough() and also can be referenced from other standards. Closes whatwg#961.
Require pipeThrough() to be called on a ReadableStream. Stop delegating to this.pipeTo(). Also throw exceptions if *this* or _writable_ are not streams or they are locked, or if *signal* is not an AbortSignal. Also require _readable_ to be a ReadableStream. Add a new abstract operation, ReadableStreamPipeTo(), which is used internally by pipeTo() and pipeThrough() and also can be referenced from other standards. Closes #961.
Currently
pipeThrough()
operates generically on this. It performs no brand check, and will attempt to callthis.pipeTo()
regardless of whether this is a ReadableStream or not.Blink is currently changing its streams implementation to use IDL, and there's no way to directly express this in IDL. We will need some workaround to pass the tests.
Having
pipeThrough()
be generic complicates the standard (because we have to check if the return value ofpipeTo()
is a Promise), and complicates IDL-based implementations. I think it doesn't provide much value, and the easiest thing to do would be to add a brand check and make it call an abstract PipeTo operation internally.@domenic, what do you think?
The text was updated successfully, but these errors were encountered: