Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 2772293002: Update WritableStream to new standard version (Closed)

Created:
3 years, 8 months ago by Adam Rice
Modified:
3 years, 8 months ago
CC:
domenic, blink-reviews, blink-reviews-w3ctests_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update WritableStream to new standard version This CL updates the WritableStream implementation from standard version 347667724b8a4b83fcc379b730603cf4cd0d6e91 to https://github.com/whatwg/streams/commit/830c24e023d24b353afe755aba47e5c67ad5cf5c Most significant changes (all come from the standard): * WritableStream abort logic clean up * Sink abort() will no longer be called while sink start() is executing * desiredSize calculation is now clamped to match the standard * Protection against re-entrant strategy size() functions * Many bug fixes Implementation notes: * WritableStream now has a [[backpressure]] flag. This is packed into the same field as the [[state]] field, which is now called _stateAndFlags. * WritableStreamDefaultController now only has one flag, [[started]], so _defaultControllerFlags is gone and [[started]] has a field to itself. * It does not appear to be possible to dispatch to a method named by a V8 PrivateSymbol via the prototype chain, so static dispatch is used for [[AbortSteps]], [[ErrorSteps]] and [[StartSteps]] instead. * A new V8 internal method v8.promiseState() is used to check the [[PromiseStatus]] field mentioned in the standard. All streams/writable-streams web-platform-tests now pass; as a result expectations are removed. The obsolete copy of the web-platform-tests in http/tests/streams/writable-streams is also gone. The changed semantics of abort() necessitated a minor change in the implementation of ReadableStream.pipeTo(). Apart from this change, ReadableStream has *not* been updated to the latest spec version. BUG=658144, 626703 Review-Url: https://codereview.chromium.org/2772293002 Cr-Commit-Position: refs/heads/master@{#463954} Committed: https://chromium.googlesource.com/chromium/src/+/3105d5e2ffe590989bbbda65e5b0e66a4a5049bd

Patch Set 1 #

Patch Set 2 : Add back a couple of commits that git lost #

Patch Set 3 : Update with changes up to 990973cdc1a4617222406621a3e449b7f89f5e0d #

Total comments: 10

Patch Set 4 : Changes from domenic@ review #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -3412 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 2 chunks +0 lines, -8 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/aborting-expected.txt View 1 2 1 chunk +0 lines, -44 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/aborting.dedicatedworker-expected.txt View 1 2 1 chunk +0 lines, -44 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/aborting.serviceworker.https-expected.txt View 1 2 1 chunk +0 lines, -45 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/aborting.sharedworker-expected.txt View 1 2 1 chunk +0 lines, -44 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/floating-point-total-queue-size-expected.txt View 1 chunk +0 lines, -7 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt View 1 chunk +0 lines, -8 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/general-expected.txt View 1 chunk +0 lines, -17 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/general.dedicatedworker-expected.txt View 1 chunk +0 lines, -17 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/general.serviceworker.https-expected.txt View 1 chunk +0 lines, -18 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/general.sharedworker-expected.txt View 1 chunk +0 lines, -17 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/start-expected.txt View 1 2 1 chunk +0 lines, -11 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/start.dedicatedworker-expected.txt View 1 2 1 chunk +0 lines, -11 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/start.serviceworker.https-expected.txt View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/start.sharedworker-expected.txt View 1 2 1 chunk +0 lines, -11 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/write-expected.txt View 1 chunk +0 lines, -13 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/write.dedicatedworker-expected.txt View 1 chunk +0 lines, -13 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/write.serviceworker.https-expected.txt View 1 chunk +0 lines, -14 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/streams/writable-streams/write.sharedworker-expected.txt View 1 chunk +0 lines, -13 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/aborting.js View 1 1 chunk +0 lines, -593 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/aborting.https.html View 1 1 chunk +0 lines, -14 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/aborting.https-expected.txt View 1 2 1 chunk +0 lines, -125 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/bad-strategies.js View 1 1 chunk +0 lines, -93 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/bad-strategies.https.html View 1 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/bad-strategies.https-expected.txt View 1 2 1 chunk +0 lines, -29 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/bad-underlying-sinks.js View 1 1 chunk +0 lines, -215 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/bad-underlying-sinks.https.html View 1 1 chunk +0 lines, -14 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/bad-underlying-sinks.https-expected.txt View 1 2 1 chunk +0 lines, -49 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/brand-checks.js View 1 1 chunk +0 lines, -79 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/brand-checks.https.html View 1 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/brand-checks.https-expected.txt View 1 2 1 chunk +0 lines, -29 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/byte-length-queuing-strategy.js View 1 1 chunk +0 lines, -33 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/byte-length-queuing-strategy.https.html View 1 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/byte-length-queuing-strategy.https-expected.txt View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/close.js View 1 1 chunk +0 lines, -216 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/close.https.html View 1 1 chunk +0 lines, -14 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/close.https-expected.txt View 1 2 1 chunk +0 lines, -49 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/constructor.js View 1 1 chunk +0 lines, -154 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/constructor.https.html View 1 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/constructor.https-expected.txt View 1 2 1 chunk +0 lines, -53 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/count-queuing-strategy.js View 1 1 chunk +0 lines, -129 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/count-queuing-strategy.https.html View 1 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/count-queuing-strategy.https-expected.txt View 1 2 1 chunk +0 lines, -17 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/general.js View 1 1 chunk +0 lines, -218 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/general.https.html View 1 1 chunk +0 lines, -12 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/general.https-expected.txt View 1 2 1 chunk +0 lines, -53 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/start.js View 1 1 chunk +0 lines, -107 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/start.https.html View 1 1 chunk +0 lines, -14 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/start.https-expected.txt View 1 2 1 chunk +0 lines, -25 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/write.js View 1 1 chunk +0 lines, -228 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/write.https.html View 1 1 chunk +0 lines, -14 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/streams/writable-streams/write.https-expected.txt View 1 2 1 chunk +0 lines, -41 lines 0 comments Download
M third_party/WebKit/Source/core/streams/ReadableStream.js View 1 chunk +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/streams/WritableStream.js View 1 2 3 20 chunks +419 lines, -358 lines 3 comments Download

Messages

Total messages: 29 (18 generated)
Adam Rice
+tyoshino, +domenic FYI I'm not sending this for review yet. I currently plan to add ...
3 years, 8 months ago (2017-03-27 12:29:46 UTC) #3
Adam Rice
3 years, 8 months ago (2017-03-31 14:57:04 UTC) #10
domenic
lgtm with some nits. You may want to change the commit target to https://github.com/whatwg/streams/commit/830c24e023d24b353afe755aba47e5c67ad5cf5c https://codereview.chromium.org/2772293002/diff/40001/third_party/WebKit/Source/core/streams/WritableStream.js ...
3 years, 8 months ago (2017-04-05 07:02:43 UTC) #11
Adam Rice
Commit target changed. https://codereview.chromium.org/2772293002/diff/40001/third_party/WebKit/Source/core/streams/WritableStream.js File third_party/WebKit/Source/core/streams/WritableStream.js (right): https://codereview.chromium.org/2772293002/diff/40001/third_party/WebKit/Source/core/streams/WritableStream.js#newcode25 third_party/WebKit/Source/core/streams/WritableStream.js:25: const _stateAndFlags = v8.createPrivateSymbol('[[stateAndFlags]]'); On 2017/04/05 ...
3 years, 8 months ago (2017-04-10 01:04:04 UTC) #13
Adam Rice
+tyoshino for streams OWNERS.
3 years, 8 months ago (2017-04-10 01:05:09 UTC) #15
tyoshino (SeeGerritForStatus)
On 2017/04/10 01:05:09, Adam Rice wrote: > +tyoshino for streams OWNERS. Will do. Adam, please ...
3 years, 8 months ago (2017-04-10 05:58:10 UTC) #20
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/2772293002/diff/60001/third_party/WebKit/Source/core/streams/WritableStream.js File third_party/WebKit/Source/core/streams/WritableStream.js (right): https://codereview.chromium.org/2772293002/diff/60001/third_party/WebKit/Source/core/streams/WritableStream.js#newcode903 third_party/WebKit/Source/core/streams/WritableStream.js:903: ResetQueue(controller); In the spec, only [[queue]] is cleared ...
3 years, 8 months ago (2017-04-12 04:21:13 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2772293002/60001
3 years, 8 months ago (2017-04-12 06:03:06 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/3105d5e2ffe590989bbbda65e5b0e66a4a5049bd
3 years, 8 months ago (2017-04-12 08:01:25 UTC) #27
Adam Rice
https://codereview.chromium.org/2772293002/diff/60001/third_party/WebKit/Source/core/streams/WritableStream.js File third_party/WebKit/Source/core/streams/WritableStream.js (right): https://codereview.chromium.org/2772293002/diff/60001/third_party/WebKit/Source/core/streams/WritableStream.js#newcode903 third_party/WebKit/Source/core/streams/WritableStream.js:903: ResetQueue(controller); On 2017/04/12 04:21:13, tyoshino wrote: > In the ...
3 years, 8 months ago (2017-04-13 05:54:40 UTC) #28
tyoshino (SeeGerritForStatus)
3 years, 8 months ago (2017-04-13 07:38:07 UTC) #29
Message was sent while issue was closed.
https://codereview.chromium.org/2772293002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/streams/WritableStream.js (right):

https://codereview.chromium.org/2772293002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/streams/WritableStream.js:903:
ResetQueue(controller);
On 2017/04/13 05:54:40, Adam Rice wrote:
> On 2017/04/12 04:21:13, tyoshino wrote:
> > In the spec, only [[queue]] is cleared here. Was that intentional or we just
> > forgot to update the line in the spec?
> 
> I think I intended to update the spec, but it looks like I didn't.
> 
> Since https://github.com/whatwg/streams/pull/721 removes this line anyway, it
is
> not worth worrying about.

OK. Thanks

Powered by Google App Engine
This is Rietveld 408576698