Skip to content

Commit

Permalink
Remove NotEnumerable from Readable Streams WebIDL
Browse files Browse the repository at this point in the history
According to whatwg/streams#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 readable streams.

Bug: 1093862
Change-Id: I2cab1814a7d34beeca16b15fd6c64339d296952f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485986
Reviewed-by: Adam Rice <[email protected]>
Commit-Queue: Nidhi Jaju <[email protected]>
Cr-Commit-Position: refs/heads/master@{#819180}
  • Loading branch information
nidhijaju authored and Commit Bot committed Oct 21, 2020
1 parent 5fee819 commit f7cdb8c
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 59 deletions.
13 changes: 6 additions & 7 deletions third_party/blink/renderer/core/streams/readable_stream.idl
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
Exposed=(Window,Worker,Worklet)
] interface ReadableStream {
[CallWith=ScriptState, RaisesException] constructor(optional any underlyingSource, optional any strategy);
[NotEnumerable] readonly attribute boolean locked;
readonly attribute boolean locked;

// TODO(yhirano): function length is different from what's specced. Fix it.
[RaisesException, CallWith=ScriptState, NotEnumerable] Promise<any> cancel(
optional any reason);
[RaisesException, CallWith=ScriptState, NotEnumerable, MeasureAs=ReadableStreamGetReader] ReadableStreamDefaultReader getReader(optional any mode);
[RaisesException, CallWith=ScriptState, NotEnumerable, MeasureAs=ReadableStreamPipeThrough] any pipeThrough(
[RaisesException, CallWith=ScriptState] Promise<any> cancel(optional any reason);
[RaisesException, CallWith=ScriptState, MeasureAs=ReadableStreamGetReader] ReadableStreamDefaultReader getReader(optional any mode);
[RaisesException, CallWith=ScriptState, MeasureAs=ReadableStreamPipeThrough] any pipeThrough(
any transformStream, optional any options);
[RaisesException, CallWith=ScriptState, NotEnumerable, MeasureAs=ReadableStreamPipeTo] Promise<any> pipeTo(
[RaisesException, CallWith=ScriptState, MeasureAs=ReadableStreamPipeTo] Promise<any> pipeTo(
any destination, optional any option);
[RaisesException, CallWith=ScriptState, NotEnumerable] any tee();
[RaisesException, CallWith=ScriptState] any tee();
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

// https://streams.spec.whatwg.org/#rs-default-controller-class-definition
interface ReadableStreamDefaultController {
[NotEnumerable] readonly attribute double? desiredSize;
[CallWith=ScriptState, NotEnumerable, RaisesException] void close();
[CallWith=ScriptState, NotEnumerable, RaisesException] void enqueue(
readonly attribute double? desiredSize;
[CallWith=ScriptState, RaisesException] void close();
[CallWith=ScriptState, RaisesException] void enqueue(
optional any chunk);
[CallWith=ScriptState, NotEnumerable] void error(optional any e);
[CallWith=ScriptState] void error(optional any e);
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
ImplementedAs=ReadableStreamReader
] interface ReadableStreamDefaultReader {
[CallWith=ScriptState, RaisesException] constructor(ReadableStream stream);
[CallWith=ScriptState, NotEnumerable] readonly attribute Promise<void>
[CallWith=ScriptState] readonly attribute Promise<void>
closed;

[CallWith=ScriptState, RaisesException, NotEnumerable] Promise<void> cancel(
[CallWith=ScriptState, RaisesException] Promise<void> cancel(
optional any reason);
[CallWith=ScriptState, RaisesException, NotEnumerable] Promise<void> read();
[CallWith=ScriptState, NotEnumerable, RaisesException] void releaseLock();
[CallWith=ScriptState, RaisesException] Promise<void> read();
[CallWith=ScriptState, RaisesException] void releaseLock();
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a testharness.js-based test.
Found 224 tests; 116 PASS, 108 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 224 tests; 126 PASS, 98 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS idl_test setup
PASS idl_test validation
PASS ReadableStreamDefaultReader includes ReadableStreamGenericReader: member names are unique
Expand All @@ -10,12 +10,12 @@ PASS ReadableStream interface object name
PASS ReadableStream interface: existence and properties of interface prototype object
PASS ReadableStream interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStream interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStream interface: attribute locked assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation tee() assert_true: property should be enumerable expected true got false
PASS ReadableStream interface: attribute locked
PASS ReadableStream interface: operation cancel(optional any)
PASS ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions)
PASS ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions)
PASS ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions)
PASS ReadableStream interface: operation tee()
FAIL ReadableStream interface: async iterable<any> Cannot read property 'writable' of undefined
PASS ReadableStream must be primary interface of new ReadableStream()
PASS Stringification of new ReadableStream()
Expand All @@ -35,10 +35,10 @@ PASS ReadableStreamDefaultReader interface object name
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStreamDefaultReader interface: operation read() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation releaseLock() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: attribute closed assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
PASS ReadableStreamDefaultReader interface: operation read()
PASS ReadableStreamDefaultReader interface: operation releaseLock()
PASS ReadableStreamDefaultReader interface: attribute closed
PASS ReadableStreamDefaultReader interface: operation cancel(optional any)
PASS ReadableStreamDefaultReader must be primary interface of (new ReadableStream()).getReader()
PASS Stringification of (new ReadableStream()).getReader()
PASS ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "read()" with the proper type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a testharness.js-based test.
Found 224 tests; 116 PASS, 108 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 224 tests; 126 PASS, 98 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS idl_test setup
PASS idl_test validation
PASS ReadableStreamDefaultReader includes ReadableStreamGenericReader: member names are unique
Expand All @@ -10,12 +10,12 @@ PASS ReadableStream interface object name
PASS ReadableStream interface: existence and properties of interface prototype object
PASS ReadableStream interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStream interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStream interface: attribute locked assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation tee() assert_true: property should be enumerable expected true got false
PASS ReadableStream interface: attribute locked
PASS ReadableStream interface: operation cancel(optional any)
PASS ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions)
PASS ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions)
PASS ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions)
PASS ReadableStream interface: operation tee()
FAIL ReadableStream interface: async iterable<any> Cannot read property 'writable' of undefined
PASS ReadableStream must be primary interface of new ReadableStream()
PASS Stringification of new ReadableStream()
Expand All @@ -35,10 +35,10 @@ PASS ReadableStreamDefaultReader interface object name
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStreamDefaultReader interface: operation read() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation releaseLock() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: attribute closed assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
PASS ReadableStreamDefaultReader interface: operation read()
PASS ReadableStreamDefaultReader interface: operation releaseLock()
PASS ReadableStreamDefaultReader interface: attribute closed
PASS ReadableStreamDefaultReader interface: operation cancel(optional any)
PASS ReadableStreamDefaultReader must be primary interface of (new ReadableStream()).getReader()
PASS Stringification of (new ReadableStream()).getReader()
PASS ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "read()" with the proper type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a testharness.js-based test.
Found 224 tests; 116 PASS, 108 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 224 tests; 126 PASS, 98 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS idl_test setup
PASS idl_test validation
PASS ReadableStreamDefaultReader includes ReadableStreamGenericReader: member names are unique
Expand All @@ -10,12 +10,12 @@ PASS ReadableStream interface object name
PASS ReadableStream interface: existence and properties of interface prototype object
PASS ReadableStream interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStream interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStream interface: attribute locked assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation tee() assert_true: property should be enumerable expected true got false
PASS ReadableStream interface: attribute locked
PASS ReadableStream interface: operation cancel(optional any)
PASS ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions)
PASS ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions)
PASS ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions)
PASS ReadableStream interface: operation tee()
FAIL ReadableStream interface: async iterable<any> Cannot read property 'writable' of undefined
PASS ReadableStream must be primary interface of new ReadableStream()
PASS Stringification of new ReadableStream()
Expand All @@ -35,10 +35,10 @@ PASS ReadableStreamDefaultReader interface object name
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStreamDefaultReader interface: operation read() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation releaseLock() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: attribute closed assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
PASS ReadableStreamDefaultReader interface: operation read()
PASS ReadableStreamDefaultReader interface: operation releaseLock()
PASS ReadableStreamDefaultReader interface: attribute closed
PASS ReadableStreamDefaultReader interface: operation cancel(optional any)
PASS ReadableStreamDefaultReader must be primary interface of (new ReadableStream()).getReader()
PASS Stringification of (new ReadableStream()).getReader()
PASS ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "read()" with the proper type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a testharness.js-based test.
Found 224 tests; 116 PASS, 108 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 224 tests; 126 PASS, 98 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS idl_test setup
PASS idl_test validation
PASS ReadableStreamDefaultReader includes ReadableStreamGenericReader: member names are unique
Expand All @@ -10,12 +10,12 @@ PASS ReadableStream interface object name
PASS ReadableStream interface: existence and properties of interface prototype object
PASS ReadableStream interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStream interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStream interface: attribute locked assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions) assert_true: property should be enumerable expected true got false
FAIL ReadableStream interface: operation tee() assert_true: property should be enumerable expected true got false
PASS ReadableStream interface: attribute locked
PASS ReadableStream interface: operation cancel(optional any)
PASS ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions)
PASS ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions)
PASS ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions)
PASS ReadableStream interface: operation tee()
FAIL ReadableStream interface: async iterable<any> Cannot read property 'writable' of undefined
PASS ReadableStream must be primary interface of new ReadableStream()
PASS Stringification of new ReadableStream()
Expand All @@ -35,10 +35,10 @@ PASS ReadableStreamDefaultReader interface object name
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's "constructor" property
PASS ReadableStreamDefaultReader interface: existence and properties of interface prototype object's @@unscopables property
FAIL ReadableStreamDefaultReader interface: operation read() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation releaseLock() assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: attribute closed assert_true: property should be enumerable expected true got false
FAIL ReadableStreamDefaultReader interface: operation cancel(optional any) assert_true: property should be enumerable expected true got false
PASS ReadableStreamDefaultReader interface: operation read()
PASS ReadableStreamDefaultReader interface: operation releaseLock()
PASS ReadableStreamDefaultReader interface: attribute closed
PASS ReadableStreamDefaultReader interface: operation cancel(optional any)
PASS ReadableStreamDefaultReader must be primary interface of (new ReadableStream()).getReader()
PASS Stringification of (new ReadableStream()).getReader()
PASS ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property "read()" with the proper type
Expand Down

0 comments on commit f7cdb8c

Please sign in to comment.