[Streams API] Implement ReadableStreamController
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Apr 2015 15:55:20 +0000 (15:55 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Apr 2015 15:55:20 +0000 (15:55 +0000)
commitde351b178fbf9ac5ec23bea8fd8af0172c6c4579
tree82a244401bf1a494ac7b05393dd5a27ee7af7b2d
parent534fef019c42f2be4888688c82a6c25ca0e52770
[Streams API] Implement ReadableStreamController
https://bugs.webkit.org/show_bug.cgi?id=143608

Reviewed by Benjamin Poulain.

Source/WebCore:

Introducing ReadableStreamController, an abstraction to manage JS source stream queues.
This new interface is not exposed to JS scripts as specified, using NoInterfaceObject.

A controller is created at the time a ReadableJSStream is started and it is owned by it.
The controller may outlive the stream but as its reference will be reset, the calls to
its methods would result in exceptions.

The constructor is not implemented yet.

Change covered by existing tests and rebased expectations.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make: Added ReadableStreamController.idl related files.
* Modules/streams/ReadableStreamController.h: Added.
* Modules/streams/ReadableStreamController.idl: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp: Added ReadableStreamController.idl related files.
* bindings/js/JSReadableStreamControllerCustom.cpp: Added.
* bindings/js/ReadableStreamJSSource.cpp:
* bindings/js/ReadableStreamJSSource.h: Removed custom controller implementation.

LayoutTests:

Updated expectations as more tests are passed.
ReadableStreamController constructor tests fail due to the custom constructor being not implemented yet.
Added a test to ensure that calling a controller method when its stream is collected is throwing an error.

* streams/readable-stream.html:
* streams/readable-stream-expected.txt:
* streams/reference-implementation/bad-underlying-sources-expected.txt:
* streams/reference-implementation/brand-checks-expected.txt:
* streams/reference-implementation/count-queuing-strategy-expected.txt:
* streams/reference-implementation/readable-stream-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/streams/readable-stream-expected.txt
LayoutTests/streams/readable-stream.html
LayoutTests/streams/reference-implementation/bad-underlying-sources-expected.txt
LayoutTests/streams/reference-implementation/brand-checks-expected.txt
LayoutTests/streams/reference-implementation/count-queuing-strategy-expected.txt
LayoutTests/streams/reference-implementation/readable-stream-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/streams/ReadableStreamController.h [new file with mode: 0644]
Source/WebCore/Modules/streams/ReadableStreamController.idl [new file with mode: 0644]
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSReadableStreamControllerCustom.cpp [new file with mode: 0644]
Source/WebCore/bindings/js/ReadableStreamJSSource.cpp
Source/WebCore/bindings/js/ReadableStreamJSSource.h