[Streams API] Refactor ReadableJSStream and ReadableStreamJSSource
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 May 2015 13:30:18 +0000 (13:30 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 May 2015 13:30:18 +0000 (13:30 +0000)
commit900275887482ee44369db3c9e5e9028b35d037ec
tree7d62ab0fc723a1a50bf830b21ad4bbf6047d5872
parent56d8f7d2117e03c93c72ab8d65f352db29b5d1f7
[Streams API] Refactor ReadableJSStream and ReadableStreamJSSource
https://bugs.webkit.org/show_bug.cgi?id=144387

Reviewed by Darin Adler.

Made ReadableStreamReader a private class of ReadableJSStream.
Simplified ReadableJSStream construction so that binding constructor does not need to know about ReadableStreamJSSource.

No functional change, existing tests cover the changes.

* Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::source): Added to implement jsSource(), needed by ReadableJSStream.
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::constructJSReadableStream): Simplified to not have to handle source creation.
* bindings/js/ReadableStreamJSSource.cpp:
(WebCore::ReadableStreamJSSource::globalObject): Helper function to be used in other future methods.
(WebCore::ReadableStreamJSSource::start):
(WebCore::ReadableJSStream::create):
(WebCore::ReadableJSStream::createReader):
(WebCore::ReadableJSStream::jsSource):
(WebCore::ReadableJSStream::Reader::create):
(WebCore::ReadableJSStream::Reader::Reader):
* bindings/js/ReadableStreamJSSource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/streams/ReadableStream.h
Source/WebCore/bindings/js/JSReadableStreamCustom.cpp
Source/WebCore/bindings/js/ReadableStreamJSSource.cpp
Source/WebCore/bindings/js/ReadableStreamJSSource.h