[Readable Streams API] Implement readableByteStreamControllerCallPullIfNeeded()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 19:43:48 +0000 (19:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 19:43:48 +0000 (19:43 +0000)
commitebfb318c503941371e304be07639b01bc5373035
tree2279e18724ce440af83b4a5f91c833c24e052547
parent4d5da9ad8d4fd1ee6fe72810a095514d9ee80be9
[Readable Streams API] Implement readableByteStreamControllerCallPullIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=166022

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-12-20
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented readableByteStreamControllerCallPullIfNeeded(). This function is
in particular called when a new ReadableByteStreamController is created; hence,
ReadableByteStreamController constructor has been updated.

Added 3 tests to check behaviour in case of success/failure of the start and pull functions
associated to the underlyingByteSource.

* Modules/streams/ReadableByteStreamInternals.js:
(privateInitializeReadableByteStreamController): Updated handling of underlyingByteSource
start function (especially with call to readableByteStreamControllerCallPullIfNeeded).
(isReadableStreamBYOBReader): Added.
(readableStreamHasBYOBReader): Added.
(readableStreamHasDefaultReader): Added.
(readableByteStreamControllerCallPullIfNeeded): Added.
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamDefaultController): Added missing asserts.
* bindings/js/WebCoreBuiltinNames.h: Added readIntoRequests.

LayoutTests:

Added 3 tests to check behaviour in case of success/failure of the start and pull functions
associated to the underlyingByteSource.

* streams/readable-byte-stream-controller-expected.txt: Added expectations for new tests.
* streams/readable-byte-stream-controller.js: Added 3 new tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/streams/readable-byte-stream-controller-expected.txt
LayoutTests/streams/readable-byte-stream-controller.js
Source/WebCore/ChangeLog
Source/WebCore/Modules/streams/ReadableByteStreamInternals.js
Source/WebCore/Modules/streams/ReadableStreamInternals.js
Source/WebCore/bindings/js/WebCoreBuiltinNames.h