Diff
Modified: trunk/LayoutTests/ChangeLog (194032 => 194033)
--- trunk/LayoutTests/ChangeLog 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/ChangeLog 2015-12-14 15:57:48 UTC (rev 194033)
@@ -1,3 +1,15 @@
+2015-12-14 Youenn Fablet <[email protected]>
+
+ [Streams API] Expose ReadableStream and relatives to Worker
+ https://bugs.webkit.org/show_bug.cgi?id=152066
+
+ Reviewed by Darin Adler.
+
+ Adding ByteLengthQueuingStrategy, CountQueuingStrategy and ReadableStream as worker constructors.
+
+ * js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
+ * platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
+
2015-12-14 Carlos Alberto Lopez Perez <[email protected]>
[GTK] Unreviewed gardening.
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2015-12-14 15:57:48 UTC (rev 194033)
@@ -1,3 +1,26 @@
+2015-12-14 Youenn Fablet <[email protected]>
+
+ [Streams API] Expose ReadableStream and relatives to Worker
+ https://bugs.webkit.org/show_bug.cgi?id=152066
+
+ Reviewed by Darin Adler.
+
+ Rebasing all worker tests from FAIL to PASS.
+
+ * web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt:
+ * web-platform-tests/streams-api/count-queuing-strategy-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/cancel-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/general-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/tee-expected.txt:
+ * web-platform-tests/streams-api/readable-streams/templated-expected.txt:
+
2015-12-11 Darin Adler <[email protected]>
Reduce the number of events that can be created by Document.createEvent
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -8,11 +8,11 @@
PASS ByteLengthQueuingStrategy's highWaterMark property can be set to anything
FAIL Load byte-length-queuing-strategy.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL Can construct a ByteLengthQueuingStrategy with a valid high water mark Can't find variable: ByteLengthQueuingStrategy
-FAIL Can construct a ByteLengthQueuingStrategy with any value as its high water mark Can't find variable: ByteLengthQueuingStrategy
-FAIL ByteLengthQueuingStrategy constructor behaves as expected with strange arguments assert_throws: construction fails with undefined function "() => new ByteLengthQueuingStrategy()" threw object "ReferenceError: Can't find variable: ByteLengthQueuingStr..." ("ReferenceError") expected object "[object Object]" ("TypeError")
-FAIL ByteLengthQueuingStrategy size behaves as expected with strange arguments assert_throws: size fails with undefined function "() => ByteLengthQueuingStrategy.prototype.size()" threw object "ReferenceError: Can't find variable: ByteLengthQueuingStr..." ("ReferenceError") expected object "[object Object]" ("TypeError")
-FAIL ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments Can't find variable: ByteLengthQueuingStrategy
-FAIL ByteLengthQueuingStrategy instances have the correct properties Can't find variable: ByteLengthQueuingStrategy
-FAIL ByteLengthQueuingStrategy's highWaterMark property can be set to anything Can't find variable: ByteLengthQueuingStrategy
+PASS Can construct a ByteLengthQueuingStrategy with a valid high water mark
+PASS Can construct a ByteLengthQueuingStrategy with any value as its high water mark
+PASS ByteLengthQueuingStrategy constructor behaves as expected with strange arguments
+PASS ByteLengthQueuingStrategy size behaves as expected with strange arguments
+PASS ByteLengthQueuingStrategy.prototype.size should work generically on its this and its arguments
+PASS ByteLengthQueuingStrategy instances have the correct properties
+PASS ByteLengthQueuingStrategy's highWaterMark property can be set to anything
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/count-queuing-strategy-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/count-queuing-strategy-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/count-queuing-strategy-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -8,11 +8,11 @@
PASS CountQueuingStrategy's highWaterMark property can be set to anything
FAIL Load count-queuing-strategy.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL Can construct a CountQueuingStrategy with a valid high water mark Can't find variable: CountQueuingStrategy
-FAIL Can construct a CountQueuingStrategy with any value as its high water mark Can't find variable: CountQueuingStrategy
-FAIL CountQueuingStrategy constructor behaves as expected with strange arguments assert_throws: construction fails with undefined function "() => new CountQueuingStrategy()" threw object "ReferenceError: Can't find variable: CountQueuingStrategy" ("ReferenceError") expected object "[object Object]" ("TypeError")
-FAIL CountQueuingStrategy.prototype.size should work generically on its this and its arguments Can't find variable: CountQueuingStrategy
-FAIL CountQueuingStrategy size behaves as expected with strange arguments Can't find variable: CountQueuingStrategy
-FAIL CountQueuingStrategy instances have the correct properties Can't find variable: CountQueuingStrategy
-FAIL CountQueuingStrategy's highWaterMark property can be set to anything Can't find variable: CountQueuingStrategy
+PASS Can construct a CountQueuingStrategy with a valid high water mark
+PASS Can construct a CountQueuingStrategy with any value as its high water mark
+PASS CountQueuingStrategy constructor behaves as expected with strange arguments
+PASS CountQueuingStrategy.prototype.size should work generically on its this and its arguments
+PASS CountQueuingStrategy size behaves as expected with strange arguments
+PASS CountQueuingStrategy instances have the correct properties
+PASS CountQueuingStrategy's highWaterMark property can be set to anything
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -6,18 +6,9 @@
PASS Readable stream: invalid strategy.size return value
FAIL Load bad-strategies.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL Readable stream: throwing strategy.size getter assert_throws: construction should re-throw the error function "() => {
- new ReadableStream({}, {
- get size() {
- ..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
-FAIL Readable stream: throwing strategy.size method Can't find variable: ReadableStream
-FAIL Readable stream: throwing strategy.highWaterMark getter assert_throws: construction should re-throw the error function "() => {
- new ReadableStream({}, {
- size() {
- ..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
-FAIL Readable stream: invalid strategy.highWaterMark assert_throws: construction should throw a RangeError for -1 function "() => {
- new ReadableStream({}, {
- size() {
- ..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "RangeError" ("RangeError")
-FAIL Readable stream: invalid strategy.size return value Can't find variable: ReadableStream
+PASS Readable stream: throwing strategy.size getter
+PASS Readable stream: throwing strategy.size method
+PASS Readable stream: throwing strategy.highWaterMark getter
+PASS Readable stream: invalid strategy.highWaterMark
+PASS Readable stream: invalid strategy.size return value
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -22,31 +22,25 @@
PASS Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error
FAIL Load bad-underlying-sources.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL Underlying source start: throwing getter assert_throws: constructing the stream should re-throw the error function "() => {
- new ReadableStream({
- get start() {
- ..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
-FAIL Underlying source start: throwing method assert_throws: constructing the stream should re-throw the error function "() => {
- new ReadableStream({
- start() {
- ..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: a unique string" ("Error")
-FAIL Underlying source: throwing pull getter (initial pull) Can't find variable: ReadableStream
-FAIL Underlying source: throwing pull method (initial pull) Can't find variable: ReadableStream
-FAIL Underlying source pull: throwing getter (second pull) Can't find variable: ReadableStream
-FAIL Underlying source pull: throwing method (second pull) Can't find variable: ReadableStream
-FAIL Underlying source cancel: throwing getter Can't find variable: ReadableStream
-FAIL Underlying source cancel: throwing method Can't find variable: ReadableStream
-FAIL Underlying source: calling enqueue on an empty canceled stream should not throw Can't find variable: ReadableStream
-FAIL Underlying source: calling enqueue on a non-empty canceled stream should not throw Can't find variable: ReadableStream
-FAIL Underlying source: calling enqueue on a closed stream should throw Can't find variable: ReadableStream
-FAIL Underlying source: calling enqueue on an errored stream should throw Can't find variable: ReadableStream
-FAIL Underlying source: calling close twice on an empty stream should throw the second time Can't find variable: ReadableStream
-FAIL Underlying source: calling close twice on a non-empty stream should throw the second time Can't find variable: ReadableStream
-FAIL Underlying source: calling close on an empty canceled stream should not throw Can't find variable: ReadableStream
-FAIL Underlying source: calling close on a non-empty canceled stream should not throw Can't find variable: ReadableStream
-FAIL Underlying source: calling close after error should throw Can't find variable: ReadableStream
-FAIL Underlying source: calling error twice should throw the second time Can't find variable: ReadableStream
-FAIL Underlying source: calling error after close should throw Can't find variable: ReadableStream
-FAIL Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error Can't find variable: ReadableStream
-FAIL Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error Can't find variable: ReadableStream
+PASS Underlying source start: throwing getter
+PASS Underlying source start: throwing method
+PASS Underlying source: throwing pull getter (initial pull)
+PASS Underlying source: throwing pull method (initial pull)
+PASS Underlying source pull: throwing getter (second pull)
+PASS Underlying source pull: throwing method (second pull)
+PASS Underlying source cancel: throwing getter
+PASS Underlying source cancel: throwing method
+PASS Underlying source: calling enqueue on an empty canceled stream should not throw
+PASS Underlying source: calling enqueue on a non-empty canceled stream should not throw
+PASS Underlying source: calling enqueue on a closed stream should throw
+PASS Underlying source: calling enqueue on an errored stream should throw
+PASS Underlying source: calling close twice on an empty stream should throw the second time
+PASS Underlying source: calling close twice on a non-empty stream should throw the second time
+PASS Underlying source: calling close on an empty canceled stream should not throw
+PASS Underlying source: calling close on a non-empty canceled stream should not throw
+PASS Underlying source: calling close after error should throw
+PASS Underlying source: calling error twice should throw the second time
+PASS Underlying source: calling error after close should throw
+PASS Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error
+PASS Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -16,19 +16,19 @@
PASS ReadableStreamController.prototype.error enforces a brand check
FAIL Load brand-checks.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL Can get the ReadableStreamReader constructor indirectly Can't find variable: ReadableStream
-FAIL Can get the ReadableStreamController constructor indirectly Can't find variable: ReadableStream
-FAIL ReadableStream.prototype.cancel enforces a brand check Can't find variable: ReadableStream
-FAIL ReadableStream.prototype.getReader enforces a brand check Can't find variable: ReadableStream
-FAIL ReadableStream.prototype.tee enforces a brand check Can't find variable: ReadableStream
+PASS Can get the ReadableStreamReader constructor indirectly
+PASS Can get the ReadableStreamController constructor indirectly
+PASS ReadableStream.prototype.cancel enforces a brand check
+PASS ReadableStream.prototype.getReader enforces a brand check
+PASS ReadableStream.prototype.tee enforces a brand check
PASS ReadableStreamReader enforces a brand check on its argument
-FAIL ReadableStreamReader.prototype.closed enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
-FAIL ReadableStreamReader.prototype.cancel enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
-FAIL ReadableStreamReader.prototype.read enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
-FAIL ReadableStreamReader.prototype.releaseLock enforces a brand check undefined is not an object (evaluating 'ReadableStreamReader.prototype')
+PASS ReadableStreamReader.prototype.closed enforces a brand check
+PASS ReadableStreamReader.prototype.cancel enforces a brand check
+PASS ReadableStreamReader.prototype.read enforces a brand check
+PASS ReadableStreamReader.prototype.releaseLock enforces a brand check
PASS ReadableStreamController enforces a brand check on its argument
-FAIL ReadableStreamController can't be given a fully-constructed ReadableStream assert_throws: Constructing a ReadableStreamController should throw function "() => new ReadableStreamController(realReadableStream())" threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL ReadableStreamController.prototype.close enforces a brand check undefined is not an object (evaluating 'ReadableStreamController.prototype')
-FAIL ReadableStreamController.prototype.enqueue enforces a brand check undefined is not an object (evaluating 'ReadableStreamController.prototype')
-FAIL ReadableStreamController.prototype.error enforces a brand check undefined is not an object (evaluating 'ReadableStreamController.prototype')
+PASS ReadableStreamController can't be given a fully-constructed ReadableStream
+PASS ReadableStreamController.prototype.close enforces a brand check
+PASS ReadableStreamController.prototype.enqueue enforces a brand check
+PASS ReadableStreamController.prototype.error enforces a brand check
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/cancel-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -12,13 +12,13 @@
FAIL Load cancel.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
FAIL ReadableStream cancellation: integration test on an infinite stream derived from a random push source promise_test: Unhandled rejection with value: object "Error: forced error"
-FAIL ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: should fulfill promise when cancel callback went fine Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: should reject promise when cancel callback raises an exception Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1) Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2) Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does Can't find variable: ReadableStream
-FAIL ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called Can't find variable: ReadableStream
+PASS ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source
+PASS ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel
+PASS ReadableStream cancellation: should fulfill promise when cancel callback went fine
+PASS ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel
+PASS ReadableStream cancellation: should reject promise when cancel callback raises an exception
+PASS ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1)
+PASS ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2)
+PASS ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does
+PASS ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -5,8 +5,8 @@
PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)
FAIL Load count-queuing-strategy-integration.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL Can construct a readable stream with a valid CountQueuingStrategy Can't find variable: ReadableStream
-FAIL Correctly governs a ReadableStreamController's desiredSize property (HWM = 0) Can't find variable: ReadableStream
-FAIL Correctly governs a ReadableStreamController's desiredSize property (HWM = 1) Can't find variable: ReadableStream
-FAIL Correctly governs a ReadableStreamController's desiredSize property (HWM = 4) Can't find variable: ReadableStream
+PASS Can construct a readable stream with a valid CountQueuingStrategy
+PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 0)
+PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 1)
+PASS Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -5,8 +5,8 @@
PASS Garbage-collecting a ReadableStreamReader should not unlock its stream
FAIL Load garbage-collection.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream Can't find variable: ReadableStream
-FAIL ReadableStream closed promise should fulfill even if the stream and reader JS references are lost Can't find variable: ReadableStream
-FAIL ReadableStream closed promise should reject even if stream and reader JS references are lost Can't find variable: ReadableStream
-FAIL Garbage-collecting a ReadableStreamReader should not unlock its stream Can't find variable: ReadableStream
+PASS ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream
+PASS ReadableStream closed promise should fulfill even if the stream and reader JS references are lost
+PASS ReadableStream closed promise should reject even if stream and reader JS references are lost
+PASS Garbage-collecting a ReadableStreamReader should not unlock its stream
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/general-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/general-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/general-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -34,39 +34,37 @@
PASS ReadableStream integration test: adapting an async pull source
FAIL Load general.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL ReadableStream can be constructed with no errors Can't find variable: ReadableStream
-FAIL ReadableStream can't be constructed with garbage assert_throws: constructor should throw when the source is null function "() => new ReadableStream(null)" threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL ReadableStream instances should have the correct list of properties Can't find variable: ReadableStream
-FAIL ReadableStream constructor should throw for non-function start arguments assert_throws: constructor should throw when start is not a function function "() => {
- new ReadableStream({ start: 'potato' });
- }" threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL ReadableStream constructor can get initial garbage as cancel argument Can't find variable: ReadableStream
-FAIL ReadableStream constructor can get initial garbage as pull argument Can't find variable: ReadableStream
-FAIL ReadableStream start should be called with the proper parameters Can't find variable: ReadableStream
-FAIL ReadableStream start controller parameter should be extensible Can't find variable: ReadableStream
-FAIL ReadableStream should be able to call start method within prototype chain of its source Can't find variable: ReadableStream
-FAIL ReadableStream start should be able to return a promise Can't find variable: ReadableStream
-FAIL ReadableStream start should be able to return a promise and reject it Can't find variable: ReadableStream
-FAIL ReadableStream should be able to enqueue different objects. Can't find variable: ReadableStream
-FAIL ReadableStream: if pull rejects, it should error the stream Can't find variable: ReadableStream
-FAIL ReadableStream: should only call pull once upon starting the stream Can't find variable: ReadableStream
-FAIL ReadableStream: should call pull when trying to read from a started, empty stream Can't find variable: ReadableStream
-FAIL ReadableStream: should only call pull once on a non-empty stream read from before start fulfills Can't find variable: ReadableStream
-FAIL ReadableStream: should only call pull once on a non-empty stream read from after start fulfills Can't find variable: ReadableStream
-FAIL ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining Can't find variable: ReadableStream
-FAIL ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining Can't find variable: ReadableStream
-FAIL ReadableStream: should not call pull until the previous pull call's promise fulfills Can't find variable: ReadableStream
-FAIL ReadableStream: should pull after start, and after every read Can't find variable: ReadableStream
-FAIL ReadableStream: should not call pull after start if the stream is now closed Can't find variable: ReadableStream
-FAIL ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows Can't find variable: ReadableStream
-FAIL ReadableStream pull should be able to close a stream. Can't find variable: ReadableStream
-FAIL ReadableStream: enqueue should throw when the stream is readable but draining Can't find variable: ReadableStream
-FAIL ReadableStream: enqueue should throw when the stream is closed Can't find variable: ReadableStream
-FAIL ReadableStream: enqueue should throw the stored error when the stream is errored Can't find variable: ReadableStream
-FAIL ReadableStream: should call underlying source methods as methods Can't find variable: ReadableStream
-FAIL ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue Can't find variable: ReadableStream
-FAIL ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately Can't find variable: ReadableStream
-FAIL ReadableStream integration test: adapting a random push source Can't find variable: ReadableStream
-FAIL ReadableStream integration test: adapting a sync pull source Can't find variable: ReadableStream
-FAIL ReadableStream integration test: adapting an async pull source Can't find variable: ReadableStream
+PASS ReadableStream can be constructed with no errors
+PASS ReadableStream can't be constructed with garbage
+FAIL ReadableStream instances should have the correct list of properties assert_false: method should be non-enumerable expected false got true
+PASS ReadableStream constructor should throw for non-function start arguments
+PASS ReadableStream constructor can get initial garbage as cancel argument
+PASS ReadableStream constructor can get initial garbage as pull argument
+FAIL ReadableStream start should be called with the proper parameters assert_false: close should be non-enumerable expected false got true
+PASS ReadableStream start controller parameter should be extensible
+PASS ReadableStream should be able to call start method within prototype chain of its source
+PASS ReadableStream start should be able to return a promise
+PASS ReadableStream start should be able to return a promise and reject it
+PASS ReadableStream should be able to enqueue different objects.
+PASS ReadableStream: if pull rejects, it should error the stream
+PASS ReadableStream: should only call pull once upon starting the stream
+PASS ReadableStream: should call pull when trying to read from a started, empty stream
+PASS ReadableStream: should only call pull once on a non-empty stream read from before start fulfills
+PASS ReadableStream: should only call pull once on a non-empty stream read from after start fulfills
+PASS ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining
+PASS ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining
+PASS ReadableStream: should not call pull until the previous pull call's promise fulfills
+PASS ReadableStream: should pull after start, and after every read
+PASS ReadableStream: should not call pull after start if the stream is now closed
+PASS ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows
+PASS ReadableStream pull should be able to close a stream.
+PASS ReadableStream: enqueue should throw when the stream is readable but draining
+PASS ReadableStream: enqueue should throw when the stream is closed
+PASS ReadableStream: enqueue should throw the stored error when the stream is errored
+PASS ReadableStream: should call underlying source methods as methods
+PASS ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue
+PASS ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately
+PASS ReadableStream integration test: adapting a random push source
+PASS ReadableStream integration test: adapting a sync pull source
+PASS ReadableStream integration test: adapting an async pull source
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -6,9 +6,9 @@
PASS ReadableStream.prototype.pipeThrough should work with missing readable, writable, or options
FAIL Load pipe-through.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL ReadableStream.prototype.pipeThrough should work generically on its this and its arguments Can't find variable: ReadableStream
-FAIL ReadableStream.prototype.pipeThrough should throw when its first argument is not convertible to an object Can't find variable: ReadableStream
-FAIL ReadableStream.prototype.pipeThrough should throw when "this" has no pipeTo method Can't find variable: ReadableStream
-FAIL ReadableStream.prototype.pipeThrough should rethrow errors from accessing pipeTo, readable, or writable assert_throws: pipeThrough should rethrow the error thrown by pipeTo function "() => ReadableStream.prototype.pipeThrough.call(throwingP..." threw object "ReferenceError: Can't find variable: ReadableStream" ("ReferenceError") expected object "Error: potato" ("Error")
-FAIL ReadableStream.prototype.pipeThrough should work with missing readable, writable, or options Can't find variable: ReadableStream
+PASS ReadableStream.prototype.pipeThrough should work generically on its this and its arguments
+PASS ReadableStream.prototype.pipeThrough should throw when its first argument is not convertible to an object
+PASS ReadableStream.prototype.pipeThrough should throw when "this" has no pipeTo method
+PASS ReadableStream.prototype.pipeThrough should rethrow errors from accessing pipeTo, readable, or writable
+PASS ReadableStream.prototype.pipeThrough should work with missing readable, writable, or options
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -27,30 +27,30 @@
PASS Reading twice on a stream that gets errored
FAIL Load readable-stream-reader.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL Can get the ReadableStreamReader constructor indirectly Can't find variable: ReadableStream
+PASS Can get the ReadableStreamReader constructor indirectly
PASS ReadableStreamReader constructor should get a ReadableStream object as argument
-FAIL ReadableStreamReader instances should have the correct list of properties Can't find variable: ReadableStream
-FAIL ReadableStreamReader closed should always return the same promise object Can't find variable: ReadableStream
-FAIL Constructing a ReadableStreamReader directly should fail if the stream is already locked (via direct construction) Can't find variable: ReadableStream
-FAIL Getting a ReadableStreamReader via getReader should fail if the stream is already locked (via direct construction) Can't find variable: ReadableStream
-FAIL Constructing a ReadableStreamReader directly should fail if the stream is already locked (via getReader) Can't find variable: ReadableStream
-FAIL Getting a ReadableStreamReader via getReader should fail if the stream is already locked (via getReader) Can't find variable: ReadableStream
-FAIL Constructing a ReadableStreamReader directly should be OK if the stream is closed Can't find variable: ReadableStream
-FAIL Constructing a ReadableStreamReader directly should be OK if the stream is errored Can't find variable: ReadableStream
-FAIL Reading from a reader for an empty stream will wait until a chunk is available Can't find variable: ReadableStream
-FAIL cancel() on a reader does not release the reader Can't find variable: ReadableStream
-FAIL closed should be fulfilled after stream is closed (.closed access before acquiring) Can't find variable: ReadableStream
-FAIL closed should be rejected after reader releases its lock (multiple stream locks) Can't find variable: ReadableStream
-FAIL Multiple readers can access the stream in sequence Can't find variable: ReadableStream
-FAIL Cannot use an already-released reader to unlock a stream again Can't find variable: ReadableStream
-FAIL cancel() on a released reader is a no-op and does not pass through Can't find variable: ReadableStream
-FAIL Getting a second reader after erroring the stream and releasing the reader should succeed Can't find variable: ReadableStream
-FAIL ReadableStreamReader closed promise should be rejected with undefined if that is the error Can't find variable: ReadableStream
-FAIL ReadableStreamReader: if start rejects with no parameter, it should error the stream with an undefined error Can't find variable: ReadableStream
-FAIL Erroring a ReadableStream after checking closed should reject ReadableStreamReader closed promise Can't find variable: ReadableStream
-FAIL Erroring a ReadableStream before checking closed should reject ReadableStreamReader closed promise Can't find variable: ReadableStream
-FAIL Reading twice on a stream that gets closed Can't find variable: ReadableStream
-FAIL Reading twice on a closed stream Can't find variable: ReadableStream
-FAIL Reading twice on an errored stream Can't find variable: ReadableStream
-FAIL Reading twice on a stream that gets errored Can't find variable: ReadableStream
+FAIL ReadableStreamReader instances should have the correct list of properties assert_equals: method should be non-enumerable expected false but got true
+PASS ReadableStreamReader closed should always return the same promise object
+PASS Constructing a ReadableStreamReader directly should fail if the stream is already locked (via direct construction)
+PASS Getting a ReadableStreamReader via getReader should fail if the stream is already locked (via direct construction)
+PASS Constructing a ReadableStreamReader directly should fail if the stream is already locked (via getReader)
+PASS Getting a ReadableStreamReader via getReader should fail if the stream is already locked (via getReader)
+PASS Constructing a ReadableStreamReader directly should be OK if the stream is closed
+PASS Constructing a ReadableStreamReader directly should be OK if the stream is errored
+PASS Reading from a reader for an empty stream will wait until a chunk is available
+PASS cancel() on a reader does not release the reader
+PASS closed should be fulfilled after stream is closed (.closed access before acquiring)
+PASS closed should be rejected after reader releases its lock (multiple stream locks)
+PASS Multiple readers can access the stream in sequence
+PASS Cannot use an already-released reader to unlock a stream again
+PASS cancel() on a released reader is a no-op and does not pass through
+PASS Getting a second reader after erroring the stream and releasing the reader should succeed
+PASS ReadableStreamReader closed promise should be rejected with undefined if that is the error
+PASS ReadableStreamReader: if start rejects with no parameter, it should error the stream with an undefined error
+PASS Erroring a ReadableStream after checking closed should reject ReadableStreamReader closed promise
+PASS Erroring a ReadableStream before checking closed should reject ReadableStreamReader closed promise
+PASS Reading twice on a stream that gets closed
+PASS Reading twice on a closed stream
+PASS Reading twice on an errored stream
+PASS Reading twice on a stream that gets errored
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/tee-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/tee-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/tee-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -11,14 +11,14 @@
PASS ReadableStream teeing: erroring the original should immediately error the branches
FAIL Load tee.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
-FAIL ReadableStream teeing: rs.tee() returns an array of two ReadableStreams Can't find variable: ReadableStream
-FAIL ReadableStream teeing: should be able to read one branch to the end without affecting the other Can't find variable: ReadableStream
-FAIL ReadableStream teeing: values should be equal across each branch Can't find variable: ReadableStream
-FAIL ReadableStream teeing: errors in the source should propagate to both branches Can't find variable: ReadableStream
-FAIL ReadableStream teeing: canceling branch1 should not impact branch2 Can't find variable: ReadableStream
-FAIL ReadableStream teeing: canceling branch2 should not impact branch2 Can't find variable: ReadableStream
-FAIL ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array Can't find variable: ReadableStream
-FAIL ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches Can't find variable: ReadableStream
-FAIL ReadableStream teeing: closing the original should immediately close the branches Can't find variable: ReadableStream
-FAIL ReadableStream teeing: erroring the original should immediately error the branches Can't find variable: ReadableStream
+PASS ReadableStream teeing: rs.tee() returns an array of two ReadableStreams
+PASS ReadableStream teeing: should be able to read one branch to the end without affecting the other
+PASS ReadableStream teeing: values should be equal across each branch
+PASS ReadableStream teeing: errors in the source should propagate to both branches
+PASS ReadableStream teeing: canceling branch1 should not impact branch2
+PASS ReadableStream teeing: canceling branch2 should not impact branch2
+PASS ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array
+PASS ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches
+PASS ReadableStream teeing: closing the original should immediately close the branches
+PASS ReadableStream teeing: erroring the original should immediately error the branches
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/templated-expected.txt (194032 => 194033)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/templated-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/templated-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -87,88 +87,88 @@
FAIL Load templated.js with SharedWorker assert_unreached: SharedWorker is unavailable Reached unreachable code
FAIL Untitled undefined is not an object (evaluating 'navigator.serviceWorker.getRegistration')
PASS Running templatedRSEmpty with ReadableStream (empty)
-FAIL instances have the correct methods and properties Can't find variable: ReadableStream
+PASS instances have the correct methods and properties
PASS Running templatedRSEmptyReader with ReadableStream (empty) reader
-FAIL instances have the correct methods and properties Can't find variable: ReadableStream
-FAIL locked should be true Can't find variable: ReadableStream
-FAIL read() should never settle Can't find variable: ReadableStream
-FAIL two read()s should both never settle Can't find variable: ReadableStream
-FAIL read() should return distinct promises each time Can't find variable: ReadableStream
-FAIL getReader() again on the stream should fail Can't find variable: ReadableStream
-FAIL releasing the lock with pending read requests should throw but the read requests should stay pending Can't find variable: ReadableStream
-FAIL releasing the lock should cause further read() calls to reject with a TypeError Can't find variable: ReadableStream
-FAIL releasing the lock should cause closed calls to reject with a TypeError Can't find variable: ReadableStream
-FAIL releasing the lock should cause locked to become false Can't find variable: ReadableStream
-FAIL canceling via the reader should cause the reader to act closed Can't find variable: ReadableStream
-FAIL canceling via the stream should fail Can't find variable: ReadableStream
+PASS instances have the correct methods and properties
+PASS locked should be true
+PASS read() should never settle
+PASS two read()s should both never settle
+PASS read() should return distinct promises each time
+PASS getReader() again on the stream should fail
+PASS releasing the lock with pending read requests should throw but the read requests should stay pending
+PASS releasing the lock should cause further read() calls to reject with a TypeError
+PASS releasing the lock should cause closed calls to reject with a TypeError
+PASS releasing the lock should cause locked to become false
+PASS canceling via the reader should cause the reader to act closed
+PASS canceling via the stream should fail
PASS Running templatedRSClosed with ReadableStream (closed via call in start)
-FAIL cancel() should return a distinct fulfilled promise each time Can't find variable: ReadableStream
-FAIL locked should be false Can't find variable: ReadableStream
-FAIL getReader() should be OK Can't find variable: ReadableStream
-FAIL should be able to acquire multiple readers if they are released in succession Can't find variable: ReadableStream
-FAIL should not be able to acquire a second reader if we don't release the first one Can't find variable: ReadableStream
+PASS cancel() should return a distinct fulfilled promise each time
+PASS locked should be false
+PASS getReader() should be OK
+PASS should be able to acquire multiple readers if they are released in succession
+PASS should not be able to acquire a second reader if we don't release the first one
PASS Running templatedRSClosedReader with ReadableStream reader (closed before getting reader)
-FAIL read() should fulfill with { value: undefined, done: true } Can't find variable: ReadableStream
-FAIL read() multiple times should fulfill with { value: undefined, done: true } Can't find variable: ReadableStream
-FAIL read() should work when used within another read() fulfill callback Can't find variable: ReadableStream
-FAIL closed should fulfill with undefined Can't find variable: ReadableStream
-FAIL releasing the lock should cause closed to reject and change identity Can't find variable: ReadableStream
-FAIL cancel() should return a distinct fulfilled promise each time Can't find variable: ReadableStream
+PASS read() should fulfill with { value: undefined, done: true }
+PASS read() multiple times should fulfill with { value: undefined, done: true }
+PASS read() should work when used within another read() fulfill callback
+PASS closed should fulfill with undefined
+PASS releasing the lock should cause closed to reject and change identity
+PASS cancel() should return a distinct fulfilled promise each time
PASS Running templatedRSClosedReader with ReadableStream reader (closed after getting reader)
-FAIL read() should fulfill with { value: undefined, done: true } Can't find variable: ReadableStream
-FAIL read() multiple times should fulfill with { value: undefined, done: true } Can't find variable: ReadableStream
-FAIL read() should work when used within another read() fulfill callback Can't find variable: ReadableStream
-FAIL closed should fulfill with undefined Can't find variable: ReadableStream
-FAIL releasing the lock should cause closed to reject and change identity Can't find variable: ReadableStream
-FAIL cancel() should return a distinct fulfilled promise each time Can't find variable: ReadableStream
+PASS read() should fulfill with { value: undefined, done: true }
+PASS read() multiple times should fulfill with { value: undefined, done: true }
+PASS read() should work when used within another read() fulfill callback
+PASS closed should fulfill with undefined
+PASS releasing the lock should cause closed to reject and change identity
+PASS cancel() should return a distinct fulfilled promise each time
PASS Running templatedRSClosed with ReadableStream (closed via cancel)
-FAIL cancel() should return a distinct fulfilled promise each time Can't find variable: ReadableStream
-FAIL locked should be false Can't find variable: ReadableStream
-FAIL getReader() should be OK Can't find variable: ReadableStream
-FAIL should be able to acquire multiple readers if they are released in succession Can't find variable: ReadableStream
-FAIL should not be able to acquire a second reader if we don't release the first one Can't find variable: ReadableStream
+PASS cancel() should return a distinct fulfilled promise each time
+PASS locked should be false
+PASS getReader() should be OK
+PASS should be able to acquire multiple readers if they are released in succession
+PASS should not be able to acquire a second reader if we don't release the first one
PASS Running templatedRSClosedReader with ReadableStream reader (closed via cancel after getting reader)
-FAIL read() should fulfill with { value: undefined, done: true } Can't find variable: ReadableStream
-FAIL read() multiple times should fulfill with { value: undefined, done: true } Can't find variable: ReadableStream
-FAIL read() should work when used within another read() fulfill callback Can't find variable: ReadableStream
-FAIL closed should fulfill with undefined Can't find variable: ReadableStream
-FAIL releasing the lock should cause closed to reject and change identity Can't find variable: ReadableStream
-FAIL cancel() should return a distinct fulfilled promise each time Can't find variable: ReadableStream
+PASS read() should fulfill with { value: undefined, done: true }
+PASS read() multiple times should fulfill with { value: undefined, done: true }
+PASS read() should work when used within another read() fulfill callback
+PASS closed should fulfill with undefined
+PASS releasing the lock should cause closed to reject and change identity
+PASS cancel() should return a distinct fulfilled promise each time
PASS Running templatedRSErrored with ReadableStream (errored via call in start)
-FAIL getReader() should return a reader that acts errored Can't find variable: ReadableStream
-FAIL read() twice should give the error each time Can't find variable: ReadableStream
-FAIL locked should be false Can't find variable: ReadableStream
+PASS getReader() should return a reader that acts errored
+PASS read() twice should give the error each time
+PASS locked should be false
PASS Running templatedRSErroredSyncOnly with ReadableStream (errored via call in start)
-FAIL should be able to obtain a second reader, with the correct closed promise Can't find variable: ReadableStream
-FAIL should not be able to obtain additional readers if we don't release the first lock Can't find variable: ReadableStream
-FAIL cancel() should return a distinct rejected promise each time Can't find variable: ReadableStream
-FAIL reader cancel() should return a distinct rejected promise each time Can't find variable: ReadableStream
+PASS should be able to obtain a second reader, with the correct closed promise
+PASS should not be able to obtain additional readers if we don't release the first lock
+PASS cancel() should return a distinct rejected promise each time
+PASS reader cancel() should return a distinct rejected promise each time
PASS Running templatedRSErrored with ReadableStream (errored via returning a rejected promise in start)
-FAIL getReader() should return a reader that acts errored Can't find variable: ReadableStream
-FAIL read() twice should give the error each time Can't find variable: ReadableStream
-FAIL locked should be false Can't find variable: ReadableStream
+PASS getReader() should return a reader that acts errored
+PASS read() twice should give the error each time
+PASS locked should be false
PASS Running templatedRSErroredReader with ReadableStream (errored via returning a rejected promise in start) reader
-FAIL closed should reject with the error Can't find variable: ReadableStream
-FAIL releasing the lock should cause closed to reject and change identity Can't find variable: ReadableStream
-FAIL read() should reject with the error Can't find variable: ReadableStream
+PASS closed should reject with the error
+PASS releasing the lock should cause closed to reject and change identity
+PASS read() should reject with the error
PASS Running templatedRSErroredReader with ReadableStream reader (errored before getting reader)
-FAIL closed should reject with the error Can't find variable: ReadableStream
-FAIL releasing the lock should cause closed to reject and change identity Can't find variable: ReadableStream
-FAIL read() should reject with the error Can't find variable: ReadableStream
+PASS closed should reject with the error
+PASS releasing the lock should cause closed to reject and change identity
+PASS read() should reject with the error
PASS Running templatedRSErroredReader with ReadableStream reader (errored after getting reader)
-FAIL closed should reject with the error Can't find variable: ReadableStream
-FAIL releasing the lock should cause closed to reject and change identity Can't find variable: ReadableStream
-FAIL read() should reject with the error Can't find variable: ReadableStream
+PASS closed should reject with the error
+PASS releasing the lock should cause closed to reject and change identity
+PASS read() should reject with the error
PASS Running templatedRSTwoChunksOpenReader with ReadableStream (two chunks enqueued, still open) reader
-FAIL calling read() twice without waiting will eventually give both chunks (sequential) Can't find variable: ReadableStream
-FAIL calling read() twice without waiting will eventually give both chunks (nested) Can't find variable: ReadableStream
-FAIL read() should return distinct promises each time Can't find variable: ReadableStream
-FAIL cancel() after a read() should still give that single read result Can't find variable: ReadableStream
+PASS calling read() twice without waiting will eventually give both chunks (sequential)
+PASS calling read() twice without waiting will eventually give both chunks (nested)
+PASS read() should return distinct promises each time
+PASS cancel() after a read() should still give that single read result
PASS Running templatedRSTwoChunksClosedReader with ReadableStream (two chunks enqueued, then closed) reader
-FAIL third read(), without waiting, should give { value: undefined, done: true } (sequential) Can't find variable: ReadableStream
-FAIL third read(), without waiting, should give { value: undefined, done: true } (nested) Can't find variable: ReadableStream
-FAIL draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true Can't find variable: ReadableStream
-FAIL releasing the lock after the stream is closed should cause locked to become false Can't find variable: ReadableStream
-FAIL releasing the lock should cause further read() calls to reject with a TypeError Can't find variable: ReadableStream
-FAIL reader's closed property always returns the same promise Can't find variable: ReadableStream
+PASS third read(), without waiting, should give { value: undefined, done: true } (sequential)
+PASS third read(), without waiting, should give { value: undefined, done: true } (nested)
+PASS draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true
+PASS releasing the lock after the stream is closed should cause locked to become false
+PASS releasing the lock should cause further read() calls to reject with a TypeError
+PASS reader's closed property always returns the same promise
Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt (194032 => 194033)
--- trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -9,6 +9,16 @@
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').value is ByteLengthQueuingStrategy
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').value is DedicatedWorkerGlobalScope
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('set') is false
@@ -44,6 +54,11 @@
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').value is ReadableStream
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').value is URL
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt (194032 => 194033)
--- trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-dedicated-worker-expected.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -9,6 +9,16 @@
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Blob').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').value is ByteLengthQueuingStrategy
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').value is DedicatedWorkerGlobalScope
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'DedicatedWorkerGlobalScope').hasOwnProperty('set') is false
@@ -44,6 +54,11 @@
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').hasOwnProperty('set') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').enumerable is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'MessageEvent').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').value is ReadableStream
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ReadableStream').configurable is true
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').value is URL
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('get') is false
PASS [Worker] Object.getOwnPropertyDescriptor(global, 'URL').hasOwnProperty('set') is false
Modified: trunk/Source/WebCore/CMakeLists.txt (194032 => 194033)
--- trunk/Source/WebCore/CMakeLists.txt 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/CMakeLists.txt 2015-12-14 15:57:48 UTC (rev 194033)
@@ -1256,6 +1256,7 @@
bindings/js/ScriptGlobalObject.cpp
bindings/js/ScriptState.cpp
bindings/js/SerializedScriptValue.cpp
+ bindings/js/WebCoreJSBuiltinInternals.cpp
bindings/js/WebCoreJSBuiltins.cpp
bindings/js/WebCoreTypedArrayController.cpp
bindings/js/WorkerScriptController.cpp
Modified: trunk/Source/WebCore/ChangeLog (194032 => 194033)
--- trunk/Source/WebCore/ChangeLog 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/ChangeLog 2015-12-14 15:57:48 UTC (rev 194033)
@@ -1,3 +1,48 @@
+2015-12-14 Xabier Rodriguez Calvar <[email protected]> and Youenn Fablet <[email protected]>
+
+ [Streams API] Expose ReadableStream and relatives to Worker
+ https://bugs.webkit.org/show_bug.cgi?id=152066
+
+ Reviewed by Darin Adler.
+
+ Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
+ This file should be generated by the builtin generator once refactoring is done.
+ This code is located in JSBuiltinFunctions::initialize.
+
+ Moving ReadableStream private constructors and constants code from JSDOMWindowBase to JSDOMGlobalObject.
+ Calling JSBuiltinInternalFunctions::initialize in JSDOMGlobalObject so that internals are also available in Worker.
+
+ Made ReadableStream and relatives exposed in Worker.
+
+ Patch by Youenn Fablet.
+ Rebased and fixed style by Xabier Rodriguez Calvar.
+
+ Covered by rebased tests.
+
+ * CMakeLists.txt:
+ * Modules/streams/ByteLengthQueuingStrategy.idl:
+ * Modules/streams/CountQueuingStrategy.idl:
+ * Modules/streams/ReadableStream.idl:
+ * Modules/streams/ReadableStreamController.idl:
+ * Modules/streams/ReadableStreamReader.idl:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
+ (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
+ (WebCore::JSDOMGlobalObject::finishCreation):
+ (WebCore::JSDOMGlobalObject::visitChildren):
+ * bindings/js/JSDOMGlobalObject.h:
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::finishCreation): Deleted.
+ (WebCore::JSDOMWindowBase::visitChildren): Deleted.
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
+ (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
+ (WebCore::JSBuiltinInternalFunctions::visit):
+ (WebCore::JSBuiltinInternalFunctions::initialize):
+ * bindings/js/WebCoreJSBuiltinInternals.h:
+ * bindings/js/WebCoreJSBuiltins.h:
+
2015-12-14 Frederic Wang <[email protected]>
Move MathMLOperatorDictionary features into a separate module.
Modified: trunk/Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl (194032 => 194033)
--- trunk/Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.idl 2015-12-14 15:57:48 UTC (rev 194033)
@@ -31,6 +31,7 @@
JSBuiltin,
Constructor,
Conditional=STREAMS_API,
+ GlobalContext=DOMWindow&WorkerGlobalScope,
] interface ByteLengthQueuingStrategy {
double size();
};
Modified: trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl (194032 => 194033)
--- trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.idl 2015-12-14 15:57:48 UTC (rev 194033)
@@ -31,6 +31,7 @@
JSBuiltin,
Constructor,
Conditional=STREAMS_API,
+ GlobalContext=DOMWindow&WorkerGlobalScope,
] interface CountQueuingStrategy {
double size();
};
Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.idl (194032 => 194033)
--- trunk/Source/WebCore/Modules/streams/ReadableStream.idl 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.idl 2015-12-14 15:57:48 UTC (rev 194033)
@@ -30,6 +30,7 @@
[
Conditional=STREAMS_API,
Constructor,
+ GlobalContext=DOMWindow&WorkerGlobalScope,
JSBuiltin
] interface ReadableStream {
Promise cancel(optional any reason);
Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl (194032 => 194033)
--- trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamController.idl 2015-12-14 15:57:48 UTC (rev 194033)
@@ -30,6 +30,7 @@
[
Conditional=STREAMS_API,
CustomConstructor,
+ GlobalContext=DOMWindow&WorkerGlobalScope,
JSBuiltin,
NoInterfaceObject
] interface ReadableStreamController {
Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl (194032 => 194033)
--- trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamReader.idl 2015-12-14 15:57:48 UTC (rev 194033)
@@ -30,6 +30,7 @@
[
Conditional=STREAMS_API,
CustomConstructor,
+ GlobalContext=DOMWindow&WorkerGlobalScope,
JSBuiltin,
NoInterfaceObject
] interface ReadableStreamReader {
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (194032 => 194033)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2015-12-14 15:57:48 UTC (rev 194033)
@@ -19028,6 +19028,20 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="..\bindings\js\WebCoreJSBuiltinInternals.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\bindings\js\WebCoreJSBuiltins.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (194032 => 194033)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-12-14 15:57:48 UTC (rev 194033)
@@ -1477,6 +1477,7 @@
40ECAE7E16B8B67200C36103 /* JSDOMError.h in Headers */ = {isa = PBXBuildFile; fileRef = 40ECAE7D16B8B67200C36103 /* JSDOMError.h */; };
40ECAE8116B8B68A00C36103 /* JSDOMError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ECAE8016B8B68A00C36103 /* JSDOMError.cpp */; };
410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */; };
+ 410D33241C19985000F7FDE2 /* WebCoreJSBuiltinInternals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 410D33231C19984100F7FDE2 /* WebCoreJSBuiltinInternals.cpp */; };
4123081B138C429700BCCFCA /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93F19B1A08245E5A001E9ABC /* WebCore.framework */; };
41230913138C42FF00BCCFCA /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8216299029F4FB501000131 /* _javascript_Core.framework */; };
4127D5370F8AAB1D00E424F5 /* ScriptState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */; };
@@ -8827,6 +8828,7 @@
40ECAE7D16B8B67200C36103 /* JSDOMError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMError.h; sourceTree = "<group>"; };
40ECAE8016B8B68A00C36103 /* JSDOMError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMError.cpp; sourceTree = "<group>"; };
410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMessageEventCustom.cpp; sourceTree = "<group>"; };
+ 410D33231C19984100F7FDE2 /* WebCoreJSBuiltinInternals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreJSBuiltinInternals.cpp; sourceTree = "<group>"; };
41189EF71AD8232800B90A0D /* ReadableStreamController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamController.idl; sourceTree = "<group>"; };
4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptState.cpp; sourceTree = "<group>"; };
4129DF811BB5B79B00322A16 /* ReadableStreamController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamController.h; sourceTree = "<group>"; };
@@ -21957,6 +21959,7 @@
A75E497410752ACB00C9B896 /* SerializedScriptValue.h */,
419BE7521BC7F3DB00E1C85B /* WebCoreBuiltinNames.h */,
419BE7531BC7F3DB00E1C85B /* WebCoreJSBuiltinInternals.h */,
+ 410D33231C19984100F7FDE2 /* WebCoreJSBuiltinInternals.cpp */,
419BE7541BC7F3DB00E1C85B /* WebCoreJSBuiltins.cpp */,
419BE7551BC7F3DB00E1C85B /* WebCoreJSBuiltins.h */,
BC53D910114310CC000D817E /* WebCoreJSClientData.h */,
@@ -30937,6 +30940,7 @@
536D5A25193F40FC00CE4CAB /* SourceSizeList.cpp in Sources */,
D01A27AD10C9BFD800026A42 /* SpaceSplitString.cpp in Sources */,
626CDE0E1140424C001E5A68 /* SpatialNavigation.cpp in Sources */,
+ 410D33241C19985000F7FDE2 /* WebCoreJSBuiltinInternals.cpp in Sources */,
AA2A5AD516A4861400975A25 /* SpeechSynthesis.cpp in Sources */,
AA2A5AD316A4860D00975A25 /* SpeechSynthesisEvent.cpp in Sources */,
AA2A5AD116A4860700975A25 /* SpeechSynthesisUtterance.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp (194032 => 194033)
--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp 2015-12-14 15:57:48 UTC (rev 194033)
@@ -30,7 +30,9 @@
#include "Document.h"
#include "JSDOMWindow.h"
#include "JSEventListener.h"
+#include "JSReadableStreamPrivateConstructors.h"
#include "JSWorkerGlobalScope.h"
+#include "WebCoreJSClientData.h"
#include "WorkerGlobalScope.h"
using namespace JSC;
@@ -44,6 +46,7 @@
, m_currentEvent(0)
, m_world(world)
, m_worldIsNormal(m_world->isNormal())
+ , m_internalFunctions(vm)
{
ASSERT(m_world);
}
@@ -53,16 +56,39 @@
static_cast<JSDOMGlobalObject*>(cell)->JSDOMGlobalObject::~JSDOMGlobalObject();
}
+void JSDOMGlobalObject::addBuiltinGlobals(VM& vm)
+{
+ m_internalFunctions.initialize(*this, vm);
+#if ENABLE(STREAMS_API)
+ JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);
+ GlobalPropertyInfo staticGlobals[] = {
+ GlobalPropertyInfo(clientData.builtinNames().streamClosedPrivateName(), jsNumber(1), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamClosingPrivateName(), jsNumber(2), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamErroredPrivateName(), jsNumber(3), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamReadablePrivateName(), jsNumber(4), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamWaitingPrivateName(), jsNumber(5), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamWritablePrivateName(), jsNumber(6), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().ReadableStreamControllerPrivateName(), createReadableStreamControllerPrivateConstructor(vm, *this), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().ReadableStreamReaderPrivateName(), createReadableStreamReaderPrivateConstructor(vm, *this), DontDelete | ReadOnly),
+ };
+ addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
+#endif
+}
+
void JSDOMGlobalObject::finishCreation(VM& vm)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
+
+ addBuiltinGlobals(vm);
}
void JSDOMGlobalObject::finishCreation(VM& vm, JSObject* thisValue)
{
Base::finishCreation(vm, thisValue);
ASSERT(inherits(info()));
+
+ addBuiltinGlobals(vm);
}
ScriptExecutionContext* JSDOMGlobalObject::scriptExecutionContext() const
@@ -86,6 +112,8 @@
for (auto& constructor : thisObject->constructors().values())
visitor.append(&constructor);
+
+ thisObject->m_internalFunctions.visit(visitor);
}
void JSDOMGlobalObject::setCurrentEvent(Event* currentEvent)
Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h (194032 => 194033)
--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h 2015-12-14 15:57:48 UTC (rev 194033)
@@ -28,6 +28,7 @@
#define JSDOMGlobalObject_h
#include "PlatformExportMacros.h"
+#include "WebCoreJSBuiltinInternals.h"
#include <runtime/JSGlobalObject.h>
namespace WebCore {
@@ -78,6 +79,9 @@
return JSC::Structure::create(vm, 0, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info());
}
+ void addBuiltinGlobals(JSC::VM&);
+ friend void JSBuiltinInternalFunctions::initialize(JSDOMGlobalObject&, JSC::VM&);
+
protected:
JSDOMStructureMap m_structures;
JSDOMConstructorMap m_constructors;
@@ -85,6 +89,8 @@
Event* m_currentEvent;
const RefPtr<DOMWrapperWorld> m_world;
bool m_worldIsNormal;
+
+ JSBuiltinInternalFunctions m_internalFunctions;
};
template<class ConstructorClass>
Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (194032 => 194033)
--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp 2015-12-14 15:57:48 UTC (rev 194033)
@@ -52,17 +52,6 @@
#include "WebSafeIncrementalSweeperIOS.h"
#endif
-#if ENABLE(STREAMS_API)
-#include "JSReadableStreamPrivateConstructors.h"
-#include "ReadableStreamInternalsBuiltins.h"
-#include "StreamInternalsBuiltins.h"
-#include "WritableStreamInternalsBuiltins.h"
-#endif
-
-#if ENABLE(MEDIA_STREAM)
-#include "RTCPeerConnectionInternalsBuiltins.h"
-#endif
-
using namespace JSC;
namespace WebCore {
@@ -81,7 +70,6 @@
, m_windowCloseWatchpoints((window && window->frame()) ? IsWatched : IsInvalidated)
, m_wrapped(window)
, m_shell(shell)
- , m_privateFunctions(vm)
{
}
@@ -90,47 +78,9 @@
Base::finishCreation(vm, shell);
ASSERT(inherits(info()));
- m_privateFunctions.init(*this);
-
-#if ENABLE(STREAMS_API) || ENABLE(MEDIA_STREAM)
- JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);
-#endif
-
GlobalPropertyInfo staticGlobals[] = {
GlobalPropertyInfo(vm.propertyNames->document, jsNull(), DontDelete | ReadOnly),
GlobalPropertyInfo(vm.propertyNames->window, m_shell, DontDelete | ReadOnly),
-#if ENABLE(STREAMS_API)
- GlobalPropertyInfo(clientData.builtinNames().streamClosedPrivateName(), jsNumber(1), DontDelete | ReadOnly),
- GlobalPropertyInfo(clientData.builtinNames().streamClosingPrivateName(), jsNumber(2), DontDelete | ReadOnly),
- GlobalPropertyInfo(clientData.builtinNames().streamErroredPrivateName(), jsNumber(3), DontDelete | ReadOnly),
- GlobalPropertyInfo(clientData.builtinNames().streamReadablePrivateName(), jsNumber(4), DontDelete | ReadOnly),
- GlobalPropertyInfo(clientData.builtinNames().streamWaitingPrivateName(), jsNumber(5), DontDelete | ReadOnly),
- GlobalPropertyInfo(clientData.builtinNames().streamWritablePrivateName(), jsNumber(6), DontDelete | ReadOnly),
- GlobalPropertyInfo(clientData.builtinNames().ReadableStreamControllerPrivateName(), createReadableStreamControllerPrivateConstructor(vm, *this), DontDelete | ReadOnly),
- GlobalPropertyInfo(clientData.builtinNames().ReadableStreamReaderPrivateName(), createReadableStreamReaderPrivateConstructor(vm, *this), DontDelete | ReadOnly),
-#define DECLARE_GLOBAL_STATIC(name)\
- GlobalPropertyInfo(\
- clientData.builtinFunctions().readableStreamInternalsBuiltins().name##PrivateName(), m_privateFunctions.readableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
- WEBCORE_FOREACH_READABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
-#undef DECLARE_GLOBAL_STATIC
-#define DECLARE_GLOBAL_STATIC(name)\
- GlobalPropertyInfo(\
- clientData.builtinFunctions().streamInternalsBuiltins().name##PrivateName(), m_privateFunctions.streamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
- WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
-#undef DECLARE_GLOBAL_STATIC
-#define DECLARE_GLOBAL_STATIC(name)\
- GlobalPropertyInfo(\
- clientData.builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), m_privateFunctions.writableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
- WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
-#undef DECLARE_GLOBAL_STATIC
-#endif
-#if ENABLE(MEDIA_STREAM)
-#define DECLARE_GLOBAL_STATIC(name)\
- GlobalPropertyInfo(\
- clientData.builtinFunctions().rtcPeerConnectionInternalsBuiltins().name##PrivateName(), m_privateFunctions.rtcPeerConnectionInternals().m_##name##Function.get() , DontDelete | ReadOnly),
- WEBCORE_FOREACH_RTCPEERCONNECTIONINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
-#undef DECLARE_GLOBAL_STATIC
-#endif
};
addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
@@ -141,7 +91,6 @@
JSDOMWindowBase* thisObject = jsCast<JSDOMWindowBase*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
- thisObject->m_privateFunctions.visit(visitor);
}
void JSDOMWindowBase::destroy(JSCell* cell)
Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h (194032 => 194033)
--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h 2015-12-14 15:57:48 UTC (rev 194033)
@@ -22,7 +22,6 @@
#include "JSDOMBinding.h"
#include "JSDOMGlobalObject.h"
-#include "WebCoreJSBuiltinInternals.h"
#include <wtf/Forward.h>
namespace WebCore {
@@ -86,8 +85,6 @@
RefPtr<DOMWindow> m_wrapped;
JSDOMWindowShell* m_shell;
-
- JSBuiltinInternalFunctions m_privateFunctions;
};
// Returns a JSDOMWindow or jsNull()
Added: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.cpp (0 => 194033)
--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.cpp (rev 0)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.cpp 2015-12-14 15:57:48 UTC (rev 194033)
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2015, Canon Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Canon Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebCoreJSBuiltinInternals.h"
+
+#include "JSDOMGlobalObject.h"
+#include "WebCoreJSClientData.h"
+#include <heap/SlotVisitorInlines.h>
+#include <runtime/JSCJSValueInlines.h>
+#include <runtime/StructureInlines.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSBuiltinInternalFunctions::JSBuiltinInternalFunctions(JSC::VM& v)
+ : vm(v)
+#if ENABLE(MEDIA_STREAM)
+ , m_rtcPeerConnectionInternalsFunctions(vm)
+#endif
+#if ENABLE(STREAMS_API)
+ , m_readableStreamInternalsFunctions(vm)
+ , m_streamInternalsFunctions(vm)
+ , m_writableStreamInternalsFunctions(vm)
+#endif
+{
+}
+
+void JSBuiltinInternalFunctions::visit(JSC::SlotVisitor& visitor)
+{
+#if ENABLE(MEDIA_STREAM)
+ m_rtcPeerConnectionInternalsFunctions.visit(visitor);
+#endif
+#if ENABLE(STREAMS_API)
+ m_readableStreamInternalsFunctions.visit(visitor);
+ m_streamInternalsFunctions.visit(visitor);
+ m_writableStreamInternalsFunctions.visit(visitor);
+#endif
+#ifndef SKIP_UNUSED_PARAM
+ UNUSED_PARAM(visitor);
+#endif
+}
+
+void JSBuiltinInternalFunctions::initialize(JSDOMGlobalObject& globalObject, VM& vm)
+{
+#if ENABLE(MEDIA_STREAM)
+ m_rtcPeerConnectionInternalsFunctions.init(globalObject);
+#endif
+#if ENABLE(STREAMS_API)
+ m_readableStreamInternalsFunctions.init(globalObject);
+ m_streamInternalsFunctions.init(globalObject);
+ m_writableStreamInternalsFunctions.init(globalObject);
+#endif
+
+#if ENABLE(STREAMS_API) || ENABLE(MEDIA_STREAM)
+ JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);
+
+ JSDOMGlobalObject::GlobalPropertyInfo staticGlobals[] = {
+#if ENABLE(MEDIA_STREAM)
+#define DECLARE_GLOBAL_STATIC(name)\
+ JSDOMGlobalObject::GlobalPropertyInfo(\
+ clientData.builtinFunctions().rtcPeerConnectionInternalsBuiltins().name##PrivateName(), rtcPeerConnectionInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+ WEBCORE_FOREACH_RTCPEERCONNECTIONINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
+#undef DECLARE_GLOBAL_STATIC
+#endif
+#if ENABLE(STREAMS_API)
+#define DECLARE_GLOBAL_STATIC(name)\
+ JSDOMGlobalObject::GlobalPropertyInfo(\
+ clientData.builtinFunctions().readableStreamInternalsBuiltins().name##PrivateName(), readableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+ WEBCORE_FOREACH_READABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
+#undef DECLARE_GLOBAL_STATIC
+#define DECLARE_GLOBAL_STATIC(name)\
+ JSDOMGlobalObject::GlobalPropertyInfo(\
+ clientData.builtinFunctions().streamInternalsBuiltins().name##PrivateName(), streamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+ WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
+#undef DECLARE_GLOBAL_STATIC
+#define DECLARE_GLOBAL_STATIC(name)\
+ JSDOMGlobalObject::GlobalPropertyInfo(\
+ clientData.builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), writableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+ WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
+#undef DECLARE_GLOBAL_STATIC
+#endif
+ };
+
+ globalObject.addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
+#endif
+#ifndef SKIP_UNUSED_PARAM
+ UNUSED_PARAM(globalObject);
+ UNUSED_PARAM(vm);
+#endif
+}
+
+}
Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h (194032 => 194033)
--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltinInternals.h 2015-12-14 15:57:48 UTC (rev 194033)
@@ -27,81 +27,50 @@
#ifndef WebCoreJSBuiltinInternals_h
#define WebCoreJSBuiltinInternals_h
+#if ENABLE(MEDIA_STREAM)
+#include "RTCPeerConnectionInternalsBuiltins.h"
+#endif
+
#if ENABLE(STREAMS_API)
#include "ReadableStreamInternalsBuiltins.h"
#include "StreamInternalsBuiltins.h"
#include "WritableStreamInternalsBuiltins.h"
#endif
-#if ENABLE(MEDIA_STREAM)
-#include "RTCPeerConnectionInternalsBuiltins.h"
-#endif
-
#if ENABLE(STREAMS_API) || ENABLE(MEDIA_STREAM)
#define SKIP_UNUSED_PARAM
#endif
namespace WebCore {
+class JSDOMGlobalObject;
+
class JSBuiltinInternalFunctions {
public:
-explicit JSBuiltinInternalFunctions(JSC::VM& v)
- : vm(v)
-#if ENABLE(STREAMS_API)
- , m_readableStreamInternalsFunctions(vm)
- , m_streamInternalsFunctions(vm)
- , m_writableStreamInternalsFunctions(vm)
-#endif
+ explicit JSBuiltinInternalFunctions(JSC::VM&);
+
#if ENABLE(MEDIA_STREAM)
- , m_rtcPeerConnectionInternalsFunctions(vm)
+ RTCPeerConnectionInternalsBuiltinFunctions rtcPeerConnectionInternals() { return m_rtcPeerConnectionInternalsFunctions; }
#endif
- { }
-
#if ENABLE(STREAMS_API)
ReadableStreamInternalsBuiltinFunctions readableStreamInternals() { return m_readableStreamInternalsFunctions; }
StreamInternalsBuiltinFunctions streamInternals() { return m_streamInternalsFunctions; }
WritableStreamInternalsBuiltinFunctions writableStreamInternals() { return m_writableStreamInternalsFunctions; }
#endif
-#if ENABLE(MEDIA_STREAM)
- RTCPeerConnectionInternalsBuiltinFunctions rtcPeerConnectionInternals() { return m_rtcPeerConnectionInternalsFunctions; }
-#endif
- void visit(JSC::SlotVisitor& visitor) {
-#if ENABLE(STREAMS_API)
- m_readableStreamInternalsFunctions.visit(visitor);
- m_streamInternalsFunctions.visit(visitor);
- m_writableStreamInternalsFunctions.visit(visitor);
-#endif
-#if ENABLE(MEDIA_STREAM)
- m_rtcPeerConnectionInternalsFunctions.visit(visitor);
-#endif
-#ifndef SKIP_UNUSED_PARAM
- UNUSED_PARAM(visitor);
-#endif
- }
- void init(JSC::JSGlobalObject& globalObject) {
-#if ENABLE(STREAMS_API)
- m_readableStreamInternalsFunctions.init(globalObject);
- m_streamInternalsFunctions.init(globalObject);
- m_writableStreamInternalsFunctions.init(globalObject);
-#endif
-#if ENABLE(MEDIA_STREAM)
- m_rtcPeerConnectionInternalsFunctions.init(globalObject);
-#endif
-#ifndef SKIP_UNUSED_PARAM
- UNUSED_PARAM(globalObject);
-#endif
- }
+ void visit(JSC::SlotVisitor&);
+ void initialize(JSDOMGlobalObject&, JSC::VM&);
+
private:
JSC::VM& vm;
+#if ENABLE(MEDIA_STREAM)
+ RTCPeerConnectionInternalsBuiltinFunctions m_rtcPeerConnectionInternalsFunctions;
+#endif
#if ENABLE(STREAMS_API)
ReadableStreamInternalsBuiltinFunctions m_readableStreamInternalsFunctions;
StreamInternalsBuiltinFunctions m_streamInternalsFunctions;
WritableStreamInternalsBuiltinFunctions m_writableStreamInternalsFunctions;
#endif
-#if ENABLE(MEDIA_STREAM)
- RTCPeerConnectionInternalsBuiltinFunctions m_rtcPeerConnectionInternalsFunctions;
-#endif
};
Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h (194032 => 194033)
--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h 2015-12-14 13:00:42 UTC (rev 194032)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h 2015-12-14 15:57:48 UTC (rev 194033)
@@ -50,6 +50,10 @@
namespace WebCore {
+class JSDOMGlobalObject;
+
+void addBuiltinGlobals(JSDOMGlobalObject&, JSC::VM&);
+
class JSBuiltinFunctions {
public:
explicit JSBuiltinFunctions(JSC::VM& v)