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}
46 files changed