New issue
Advanced search Search tips

Issue 866388 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 863046



Sign in to add a comment

Update Streams implementation to latest standard version

Project Member Reported by ricea@chromium.org, Jul 23

Issue description

Blink's Stream implementation has got a few versions behind the standard, leading to some test failures. Update it.
 
Blocking: 863046
Labels: -Type-Compat Hotlist-Interop Type-Bug
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 2

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

commit 01299c9d54f774db75c4414adb320baec6e38349
Author: Adam Rice <ricea@chromium.org>
Date: Thu Aug 02 04:17:50 2018

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/1149678
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580057}
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/WebKit/LayoutTests/external/wpt/fetch/api/response/response-stream-with-broken-then.any.js
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-forward-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-forward.dedicatedworker-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-forward.serviceworker.https-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/close-propagation-forward.sharedworker-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.dedicatedworker-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.serviceworker.https-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/error-propagation-forward.sharedworker-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/piping/then-interception-expected.txt
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/WebKit/LayoutTests/external/wpt/streams/piping/then-interception.js
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/WebKit/LayoutTests/external/wpt/streams/readable-byte-streams/constructor-expected.txt
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/WebKit/LayoutTests/external/wpt/streams/readable-byte-streams/constructor.dedicatedworker-expected.txt
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/WebKit/LayoutTests/external/wpt/streams/readable-byte-streams/constructor.serviceworker.https-expected.txt
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/WebKit/LayoutTests/external/wpt/streams/readable-byte-streams/constructor.sharedworker-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/constructor-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/constructor.dedicatedworker-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/constructor.serviceworker.https-expected.txt
[delete] https://crrev.com/10d26ba530981f724704f023c79e52ed8070bc5a/third_party/WebKit/LayoutTests/external/wpt/streams/readable-streams/constructor.sharedworker-expected.txt
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/blink/renderer/core/streams/ReadableStream.js
[modify] https://crrev.com/01299c9d54f774db75c4414adb320baec6e38349/third_party/blink/renderer/core/streams/WritableStream.js

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 6

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

commit 2ceff58d3475dc7c8f8b28c571c03ae2940e25dd
Author: Adam Rice <ricea@chromium.org>
Date: Mon Aug 06 08:32:38 2018

Update WritableStream to match standard

Update WritableStream to standard version
https://github.com/whatwg/streams/commit/51227372cc84846bdcf68312724c4cac6a4b9e58

Remove failing test expectations.

Changes:

The timing of access of strategy parameters has been changed to
match the standard. This mostly only affects the tests that are looking
for it.

Algorithms are cleared out once they will no longer be called, enabling
garbage collection.

Bug: 866388
Change-Id: I948a858c101960bd19c826f9d8764575d5360c66
Reviewed-on: https://chromium-review.googlesource.com/1146622
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580822}
[delete] https://crrev.com/c9543723c28198b17db81043181ec5830bff4f54/third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/constructor-expected.txt
[delete] https://crrev.com/c9543723c28198b17db81043181ec5830bff4f54/third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/constructor.dedicatedworker-expected.txt
[delete] https://crrev.com/c9543723c28198b17db81043181ec5830bff4f54/third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/constructor.serviceworker.https-expected.txt
[delete] https://crrev.com/c9543723c28198b17db81043181ec5830bff4f54/third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/constructor.sharedworker-expected.txt
[modify] https://crrev.com/2ceff58d3475dc7c8f8b28c571c03ae2940e25dd/third_party/blink/renderer/core/streams/WritableStream.js

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 7

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

commit fe8ec7a6c39492c055f598689aed8986bac0a3c3
Author: Adam Rice <ricea@chromium.org>
Date: Tue Aug 07 08:48:57 2018

Update TransformStream to match standard

Update TransformStream to standard version
https://github.com/whatwg/streams/commit/51227372cc84846bdcf68312724c4cac6a4b9e58

Remove failing test expectations.

Changes:

The order of access of strategy parameters has been changed to
match the standard. This mostly only affects the tests that are looking
for it.

Algorithms are cleared out once they will no longer be called, enabling
garbage collection.

Bug: 866388
Change-Id: I26a062acee86112d72aeae439f461b4a1713babd
Reviewed-on: https://chromium-review.googlesource.com/1146533
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581171}
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/constructor-expected.txt
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/constructor.dedicatedworker-expected.txt
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/constructor.serviceworker.https-expected.txt
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/constructor.sharedworker-expected.txt
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/properties-expected.txt
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/properties.dedicatedworker-expected.txt
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/properties.serviceworker.https-expected.txt
[delete] https://crrev.com/c9f8e91ed36f002427d0cb280818c59aad278834/third_party/WebKit/LayoutTests/external/wpt/streams/transform-streams/properties.sharedworker-expected.txt
[modify] https://crrev.com/fe8ec7a6c39492c055f598689aed8986bac0a3c3/third_party/blink/renderer/core/streams/TransformStream.js

Status: Fixed (was: Assigned)
There are now no test failures outside of readable-byte-streams.
The ClearAlgorithms stuff didn't land yet for ReadableStreams though, right?
Status: Assigned (was: Fixed)
#7 Good point. I've re-opened this issue to make sure I don't miss that.

https://github.com/whatwg/streams/pull/948 ("Make rejections from transformAlgorithm error the readable") is also not landed, but I'm unlikely to forget about that one since it is needed to pass one of our tests.

Sign in to add a comment