Skip to content

Make pipeThough() non-generic? #961

Closed

Description

@ricea

Currently pipeThrough() operates generically on this. It performs no brand check, and will attempt to call this.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 of pipeTo() 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?

Activity

  1. domenic commented on Nov 7, 2018

    @domenic
    Member

    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.

  2. added 2 commits that reference this issue on Nov 22, 2018
    4d98b9e
    78b15e7
  3. added a commit that references this issue on Nov 27, 2018
    b494f35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions