From a2505c5b931d8e19121da681ae02eed9391be37a Mon Sep 17 00:00:00 2001 From: Nidhi Jaju Date: Wed, 21 Oct 2020 00:54:38 +0000 Subject: [PATCH] Remove NotEnumerable from Writable Streams WebIDL According to https://github.com/whatwg/streams/pull/1035, all methods and accessors are now enumerable, per Web IDL defaults, instead of non-enumerable, per ECMAScript defaults. Hence, 'NotEnumerable' can be removed from the Streams WebIDL files. This CL specifically removes them from writable streams. Bug: 1093862 Change-Id: I935a9f8726b3cb1dc4efb5b4d6db71384c8efe37 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485664 Reviewed-by: Adam Rice Commit-Queue: Nidhi Jaju Cr-Commit-Position: refs/heads/master@{#819181} --- .../renderer/core/streams/writable_stream.idl | 8 ++++---- .../writable_stream_default_controller.idl | 2 +- .../writable_stream_default_writer.idl | 12 +++++------ .../wpt/streams/idlharness.any-expected.txt | 20 +++++++++---------- .../idlharness.any.serviceworker-expected.txt | 20 +++++++++---------- .../idlharness.any.sharedworker-expected.txt | 20 +++++++++---------- .../idlharness.any.worker-expected.txt | 20 +++++++++---------- 7 files changed, 51 insertions(+), 51 deletions(-) diff --git a/third_party/blink/renderer/core/streams/writable_stream.idl b/third_party/blink/renderer/core/streams/writable_stream.idl index 8cb0ff8c53313a..bb61c208a70f78 100644 --- a/third_party/blink/renderer/core/streams/writable_stream.idl +++ b/third_party/blink/renderer/core/streams/writable_stream.idl @@ -7,9 +7,9 @@ Exposed=(Window,Worker,Worklet) ] interface WritableStream { [CallWith=ScriptState, RaisesException, MeasureAs=WritableStreamConstructor] constructor(optional any underlyingSink, optional any strategy); - [NotEnumerable] readonly attribute boolean locked; - [RaisesException, CallWith=ScriptState, NotEnumerable] Promise abort( + readonly attribute boolean locked; + [RaisesException, CallWith=ScriptState] Promise abort( optional any reason); - [RaisesException, CallWith=ScriptState, NotEnumerable] Promise close(); - [RaisesException, CallWith=ScriptState, NotEnumerable] WritableStreamDefaultWriter getWriter(); + [RaisesException, CallWith=ScriptState] Promise close(); + [RaisesException, CallWith=ScriptState] WritableStreamDefaultWriter getWriter(); }; diff --git a/third_party/blink/renderer/core/streams/writable_stream_default_controller.idl b/third_party/blink/renderer/core/streams/writable_stream_default_controller.idl index f301939cce7e11..c7bc87aca5dc33 100644 --- a/third_party/blink/renderer/core/streams/writable_stream_default_controller.idl +++ b/third_party/blink/renderer/core/streams/writable_stream_default_controller.idl @@ -6,5 +6,5 @@ // https://streams.spec.whatwg.org/#ws-default-controller-class-definition interface WritableStreamDefaultController { - [CallWith=ScriptState, NotEnumerable] void error(optional any e); + [CallWith=ScriptState] void error(optional any e); }; diff --git a/third_party/blink/renderer/core/streams/writable_stream_default_writer.idl b/third_party/blink/renderer/core/streams/writable_stream_default_writer.idl index 0b59cdf3c0dfbf..cafcd45332b249 100644 --- a/third_party/blink/renderer/core/streams/writable_stream_default_writer.idl +++ b/third_party/blink/renderer/core/streams/writable_stream_default_writer.idl @@ -9,17 +9,17 @@ Exposed=(Window,Worker,Worklet) ] interface WritableStreamDefaultWriter { [CallWith=ScriptState, RaisesException] constructor(WritableStream stream); - [CallWith=ScriptState, NotEnumerable] readonly attribute Promise + [CallWith=ScriptState] readonly attribute Promise closed; - [RaisesException, CallWith=ScriptState, NotEnumerable] readonly attribute + [RaisesException, CallWith=ScriptState] readonly attribute any desiredSize; - [CallWith=ScriptState, NotEnumerable] readonly attribute Promise + [CallWith=ScriptState] readonly attribute Promise ready; - [CallWith=ScriptState, RaisesException, NotEnumerable] Promise abort( + [CallWith=ScriptState, RaisesException] Promise abort( optional any reason); - [CallWith=ScriptState, RaisesException, NotEnumerable] Promise close(); + [CallWith=ScriptState, RaisesException] Promise close(); [CallWith=ScriptState, NotEnumerable] void releaseLock(); - [CallWith=ScriptState, RaisesException, NotEnumerable] Promise write( + [CallWith=ScriptState, RaisesException] Promise write( optional any chunk); }; diff --git a/third_party/blink/web_tests/external/wpt/streams/idlharness.any-expected.txt b/third_party/blink/web_tests/external/wpt/streams/idlharness.any-expected.txt index 542c62cc839e5d..2af3b7582dfd41 100644 --- a/third_party/blink/web_tests/external/wpt/streams/idlharness.any-expected.txt +++ b/third_party/blink/web_tests/external/wpt/streams/idlharness.any-expected.txt @@ -124,10 +124,10 @@ PASS WritableStream interface object name PASS WritableStream interface: existence and properties of interface prototype object PASS WritableStream interface: existence and properties of interface prototype object's "constructor" property PASS WritableStream interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStream interface: attribute locked assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation close() assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation getWriter() assert_true: property should be enumerable expected true got false +PASS WritableStream interface: attribute locked +PASS WritableStream interface: operation abort(optional any) +PASS WritableStream interface: operation close() +PASS WritableStream interface: operation getWriter() PASS WritableStream must be primary interface of new WritableStream() PASS Stringification of new WritableStream() PASS WritableStream interface: new WritableStream() must inherit property "locked" with the proper type @@ -141,13 +141,13 @@ PASS WritableStreamDefaultWriter interface object name PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStreamDefaultWriter interface: attribute closed assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute desiredSize assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute ready assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation close() assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: attribute closed +PASS WritableStreamDefaultWriter interface: attribute desiredSize +PASS WritableStreamDefaultWriter interface: attribute ready +PASS WritableStreamDefaultWriter interface: operation abort(optional any) +PASS WritableStreamDefaultWriter interface: operation close() FAIL WritableStreamDefaultWriter interface: operation releaseLock() assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: operation write(optional any) PASS WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() PASS Stringification of (new WritableStream()).getWriter() PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type diff --git a/third_party/blink/web_tests/external/wpt/streams/idlharness.any.serviceworker-expected.txt b/third_party/blink/web_tests/external/wpt/streams/idlharness.any.serviceworker-expected.txt index 542c62cc839e5d..2af3b7582dfd41 100644 --- a/third_party/blink/web_tests/external/wpt/streams/idlharness.any.serviceworker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/streams/idlharness.any.serviceworker-expected.txt @@ -124,10 +124,10 @@ PASS WritableStream interface object name PASS WritableStream interface: existence and properties of interface prototype object PASS WritableStream interface: existence and properties of interface prototype object's "constructor" property PASS WritableStream interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStream interface: attribute locked assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation close() assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation getWriter() assert_true: property should be enumerable expected true got false +PASS WritableStream interface: attribute locked +PASS WritableStream interface: operation abort(optional any) +PASS WritableStream interface: operation close() +PASS WritableStream interface: operation getWriter() PASS WritableStream must be primary interface of new WritableStream() PASS Stringification of new WritableStream() PASS WritableStream interface: new WritableStream() must inherit property "locked" with the proper type @@ -141,13 +141,13 @@ PASS WritableStreamDefaultWriter interface object name PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStreamDefaultWriter interface: attribute closed assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute desiredSize assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute ready assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation close() assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: attribute closed +PASS WritableStreamDefaultWriter interface: attribute desiredSize +PASS WritableStreamDefaultWriter interface: attribute ready +PASS WritableStreamDefaultWriter interface: operation abort(optional any) +PASS WritableStreamDefaultWriter interface: operation close() FAIL WritableStreamDefaultWriter interface: operation releaseLock() assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: operation write(optional any) PASS WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() PASS Stringification of (new WritableStream()).getWriter() PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type diff --git a/third_party/blink/web_tests/external/wpt/streams/idlharness.any.sharedworker-expected.txt b/third_party/blink/web_tests/external/wpt/streams/idlharness.any.sharedworker-expected.txt index 542c62cc839e5d..2af3b7582dfd41 100644 --- a/third_party/blink/web_tests/external/wpt/streams/idlharness.any.sharedworker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/streams/idlharness.any.sharedworker-expected.txt @@ -124,10 +124,10 @@ PASS WritableStream interface object name PASS WritableStream interface: existence and properties of interface prototype object PASS WritableStream interface: existence and properties of interface prototype object's "constructor" property PASS WritableStream interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStream interface: attribute locked assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation close() assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation getWriter() assert_true: property should be enumerable expected true got false +PASS WritableStream interface: attribute locked +PASS WritableStream interface: operation abort(optional any) +PASS WritableStream interface: operation close() +PASS WritableStream interface: operation getWriter() PASS WritableStream must be primary interface of new WritableStream() PASS Stringification of new WritableStream() PASS WritableStream interface: new WritableStream() must inherit property "locked" with the proper type @@ -141,13 +141,13 @@ PASS WritableStreamDefaultWriter interface object name PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStreamDefaultWriter interface: attribute closed assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute desiredSize assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute ready assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation close() assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: attribute closed +PASS WritableStreamDefaultWriter interface: attribute desiredSize +PASS WritableStreamDefaultWriter interface: attribute ready +PASS WritableStreamDefaultWriter interface: operation abort(optional any) +PASS WritableStreamDefaultWriter interface: operation close() FAIL WritableStreamDefaultWriter interface: operation releaseLock() assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: operation write(optional any) PASS WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() PASS Stringification of (new WritableStream()).getWriter() PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type diff --git a/third_party/blink/web_tests/external/wpt/streams/idlharness.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/streams/idlharness.any.worker-expected.txt index 542c62cc839e5d..2af3b7582dfd41 100644 --- a/third_party/blink/web_tests/external/wpt/streams/idlharness.any.worker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/streams/idlharness.any.worker-expected.txt @@ -124,10 +124,10 @@ PASS WritableStream interface object name PASS WritableStream interface: existence and properties of interface prototype object PASS WritableStream interface: existence and properties of interface prototype object's "constructor" property PASS WritableStream interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStream interface: attribute locked assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation close() assert_true: property should be enumerable expected true got false -FAIL WritableStream interface: operation getWriter() assert_true: property should be enumerable expected true got false +PASS WritableStream interface: attribute locked +PASS WritableStream interface: operation abort(optional any) +PASS WritableStream interface: operation close() +PASS WritableStream interface: operation getWriter() PASS WritableStream must be primary interface of new WritableStream() PASS Stringification of new WritableStream() PASS WritableStream interface: new WritableStream() must inherit property "locked" with the proper type @@ -141,13 +141,13 @@ PASS WritableStreamDefaultWriter interface object name PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's "constructor" property PASS WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property -FAIL WritableStreamDefaultWriter interface: attribute closed assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute desiredSize assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: attribute ready assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation abort(optional any) assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation close() assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: attribute closed +PASS WritableStreamDefaultWriter interface: attribute desiredSize +PASS WritableStreamDefaultWriter interface: attribute ready +PASS WritableStreamDefaultWriter interface: operation abort(optional any) +PASS WritableStreamDefaultWriter interface: operation close() FAIL WritableStreamDefaultWriter interface: operation releaseLock() assert_true: property should be enumerable expected true got false -FAIL WritableStreamDefaultWriter interface: operation write(optional any) assert_true: property should be enumerable expected true got false +PASS WritableStreamDefaultWriter interface: operation write(optional any) PASS WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter() PASS Stringification of (new WritableStream()).getWriter() PASS WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property "closed" with the proper type