[Streams API] ReadableStreamController methods should throw if its stream is not...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2016 17:27:32 +0000 (17:27 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jul 2016 17:27:32 +0000 (17:27 +0000)
commit3f66a6f528359e802cebaebe9ce46e5e1a1aeb73
treeb2177be2edca4ec8f503a7e05aee25c62fe46f7c
parent62f0a1a1be37aa5efda9ad29d5d49f330eff11e7
[Streams API] ReadableStreamController methods should throw if its stream is not readable
https://bugs.webkit.org/show_bug.cgi?id=159871

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-19
Reviewed by Xabier Rodriguez-Calvar.

LayoutTests/imported/w3c:

* web-platform-tests/streams/readable-streams/bad-underlying-sources.https-expected.txt:

Source/WebCore:

Spec now mandates close and enqueue to throw if ReadableStream is not readable.
Covered by rebased and/or modified tests.

* Modules/streams/ReadableStreamController.js:
(enqueue): Throwing a TypeError if controlled stream is not readable.
(close): Ditto.

LayoutTests:

* streams/reference-implementation/pipe-to-options.html: Updated test case according whatwg original test.
* streams/reference-implementation/readable-stream-templated.html: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.https-expected.txt
LayoutTests/streams/reference-implementation/pipe-to-options.html
LayoutTests/streams/reference-implementation/readable-stream-templated.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/streams/ReadableStreamController.js