Update ReadableStream to match standard
Apply standard changes to ReadableStream up to standard version 51227372cc84846bdcf68312724c4cac6a4b9e58. With this change, Blink's implementation once again passes all non-byte-stream ReadableStream tests. Update test expectations to match. Changes: * Use null prototypes for the objects returned by ReadableStreamDefaultReaderRead when they consumed internally by pipeTo(), tee() or fetch. This is the fix for standard issue https://github.com/whatwg/streams/issues/933 "Setting Object.prototype.then permits interfering with pipeTo() internals". * In pipeTo() complete all pending writes when readable stream is errored. * Change ordering of accessing strategy parameters to match standard. Non-user visible changes: * Use Object.assign() to be more concise when modifying the binding object in ReadableStream.js and WritableStream.js. WPT changes: * Update the expectations in response-stream-with-broken-then.any.js since interference is no longer possible. * Add extra tests to response-stream-with-broken-then.any.js for the arraybuffer -> text case which should have been broken in Chrome but wasn't, and the arraybuffer -> stream case. * Fix bugs in streams/piping/then-interception.js which are only apparent when it passes. In particular, delete Object.prototype.then even when it is not called. BUG=866388 Change-Id: I82c8ac2c2b7d71ccbf331388014e8cec847e1b65 Reviewed-on: https://chromium-review.googlesource.com/1149678Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Commit-Queue: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#580057}
Showing
This diff is collapsed.
Please register or sign in to comment