New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 668951 link

Starred by 8 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Launch-OWP
Launch-Accessibility: NA
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: NA
Launch-M-Approved: ----
Launch-M-Target: 59-Stable
Launch-Privacy: NA
Launch-Security: NotReviewed
Launch-Test: NA
Launch-UI: NA
Rollout-Type: ----

Blocked on:
issue 671958



Sign in to add a comment

pipeTo and PipeThrough (part of the Streams API)

Project Member Reported by ricea@chromium.org, Nov 28 2016

Issue description

Change description:
ReadableStream.pipeTo() is the standard way to compose Streams. It reads data from the underlying source and writes it to a WritableStream while respecting backpressure. pipeThrough() is a simple wrapper around pipeTo() that provides elegant syntax for chaining multiple streams.

Changes to API surface:
* pipeTo method added to ReadableStream interface
* pipeThrough method added to ReadableStream interface

Links:
Streams specification: https://streams.spec.whatwg.org/#rs-pipe-through

Support in other browsers:
Internet Explorer: No (?)
Firefox: No (Yes)
Safari: No (Yes)
 

Comment 1 by ricea@chromium.org, Dec 7 2016

Blockedon: 671958

Comment 2 by ricea@chromium.org, Jan 11 2017

Labels: -M-57 M-58
Missed feature freeze for M57, so bumping to M58.
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928

commit 9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928
Author: ricea <ricea@chromium.org>
Date: Thu Jan 26 17:11:57 2017

Implementation of ReadableStream pipeTo and pipeThrough

Implement the pipeTo() and pipeThrough() methods on the ReadableStream
class. They are only enabled when V8 experimental extras are, eg. when the
--enable-experimental-web-platform-features flag is used. The methods are not
visible when running without flags.

To achieve this, the methods are defined in ReadableStream.js but not
added to the global object. ReadableStreamExperimentalPipeTo.js is
executed at renderer startup time when the experimental flag is set
and simply adds the two methods to the global ReadableStream object.

This initial implementation is intentionally unoptimised. While it does
use internal APIs it won't perform any better than a polyfill using the
public APIs would. Additional optimisation work is expected after
shipping.

Also remove the failing expectations for many external/wpt/streams tests
that use piping.

serviceworker still have failing expectations due to using HTTP. When
https://github.com/w3c/web-platform-tests/commit/f36afea64a7478360f7c30b976c87acc2564e7ea
is rolled from upstream the failures will go away.

The upstream version of the streams/piping/multiple-propagation.js test
'Piping from an errored readable stream to a closed writable stream'
doesn't pass in Chromium . This is a known incompatibility with the
reference implementation which will be resolved by
https://github.com/whatwg/streams/pull/634. This CL adds a modified
version of the test in http/tests/streams/piping which verifies the
behaviour of this implementation. I have filed  http://crbug.com/684543 
to track it.

BUG= 668951 

Review-Url: https://codereview.chromium.org/2561443004
Cr-Commit-Position: refs/heads/master@{#446358}

[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/.gn
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-backward.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-backward.https-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-backward.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-forward.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-forward.https-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-forward.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-backward.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-backward.https-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-backward.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.https-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/flow-control.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/flow-control.https-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/flow-control.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/general.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/general.https-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/general.sharedworker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/external/wpt/streams/piping/multiple-propagation.dedicatedworker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/external/wpt/streams/piping/multiple-propagation.https-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/external/wpt/streams/piping/multiple-propagation.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/pipe-through.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/pipe-through.https-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/piping/pipe-through.sharedworker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/general.dedicatedworker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/general.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/pipe-through.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/pipe-through.sharedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/templated.dedicatedworker-expected.txt
[delete] https://crrev.com/3c4d50886437cc67b8e71485b478d835bc672c0d/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/templated.sharedworker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[add] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/http/tests/streams/piping/multiple-propagation.https.html
[add] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/http/tests/streams/piping/multiple-propagation.js
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/http/tests/streams/readable-streams/general.js
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/http/tests/worklet/webexposed/global-interface-listing-paint-worklet-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-compositor-worker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/Source/core/streams/README.md
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/Source/core/streams/ReadableStream.js
[add] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/Source/core/streams/ReadableStreamExperimentalPipeTo.js
[modify] https://crrev.com/9ba4a643d92a0ec3890aa1c9b7f2be349ad2c928/third_party/WebKit/Source/core/streams/WritableStream.js

Comment 4 by ricea@chromium.org, Mar 7 2017

Labels: -M-58 M-59
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f731a954bb05de9f166e427c507dac861cab0fc

commit 3f731a954bb05de9f166e427c507dac861cab0fc
Author: ricea <ricea@chromium.org>
Date: Wed Apr 05 12:35:25 2017

Ship ReadableStream pipeTo()

This involves removing the hack where out-of-line methods are defined as
internal functions in ReadableStream.js and then exported by
ReadableStreamExperimentalPipeTo.js. Now pipeThrough() and pipeTo() are defined
directly on the ReadableStream object.

ReadableStreamPipeTo() is still implemented as a separate function for
readability.

Intent to ship thread: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/0EW0_vT_MOU/rY-0w8efCwAJ

TBR=brettw@chromium.org
R=tyoshino@chromium.org
CC=domenic@chromium.org
BUG= 668951 

Review-Url: https://codereview.chromium.org/2792513002
Cr-Commit-Position: refs/heads/master@{#462041}

[modify] https://crrev.com/3f731a954bb05de9f166e427c507dac861cab0fc/.gn
[modify] https://crrev.com/3f731a954bb05de9f166e427c507dac861cab0fc/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/3f731a954bb05de9f166e427c507dac861cab0fc/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/3f731a954bb05de9f166e427c507dac861cab0fc/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/3f731a954bb05de9f166e427c507dac861cab0fc/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/3f731a954bb05de9f166e427c507dac861cab0fc/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/3f731a954bb05de9f166e427c507dac861cab0fc/third_party/WebKit/Source/core/streams/ReadableStream.js
[delete] https://crrev.com/7cd5f9222a2687524aafc477a5416d3c60b6a261/third_party/WebKit/Source/core/streams/ReadableStreamExperimentalPipeTo.js

Comment 6 by ricea@chromium.org, Apr 6 2017

Labels: Launch-Accessibility-NA Launch-Legal-NA Launch-Privacy-NA Launch-Security-NotReviewed Launch-Status-Review-Requested Launch-Test-NA Launch-UI-NA
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 14 2017

Comment 9 by ricea@chromium.org, May 9 2017

Labels: Launch-M-Target-59-Stable

Comment 10 by ricea@chromium.org, Jul 26 2017

Status: Fixed (was: Assigned)

Sign in to add a comment