[Fetch API] Remove ReadableStreamSource firstReadCallback
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2016 08:47:43 +0000 (08:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2016 08:47:43 +0000 (08:47 +0000)
commite36f5f910f32b88a5749c01d8cbc9f0dc46ef682
tree2647c157988a6b83a523b061b28a2883b5269c7a
parentfce64a52fb94942dd87fd56b6c023aa890291ab6
[Fetch API] Remove ReadableStreamSource firstReadCallback
https://bugs.webkit.org/show_bug.cgi?id=162339

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-27
Reviewed by Sam Weinig.

No observable change of behavior.
Removing ReadableStreamSource firstReadCallback.
This makes the enqueuing of data to happen when the stream is created.
In the future, we may want to implement doPull() to enqueue data when stream actually needs it.

* Modules/fetch/FetchResponseSource.cpp:
(WebCore::FetchResponseSource::doPull): Introduced as we introduce pull() in ReadableStreamSource.
* Modules/fetch/FetchResponseSource.h:
* Modules/streams/ReadableStreamInternals.js:
(readFromReadableStreamDefaultReader): Removing firstReadCallback use.
* Modules/streams/ReadableStreamSource.h: Renaming m_startPromise in m_promise since m_promise may store start and pull promises.
(WebCore::ReadableStreamSource::isStarting):
(WebCore::ReadableStreamSource::start):
(WebCore::ReadableStreamSource::pull): Introduced to support ReadableStreamSource pulling.
(WebCore::ReadableStreamSource::startFinished):
(WebCore::ReadableStreamSource::pullFinished): Ditto.
(WebCore::ReadableStreamSource::clean):
* Modules/streams/ReadableStreamSource.idl: Ditto.
* bindings/js/JSReadableStreamSourceCustom.cpp: Refactoring to use callPromiseFunction
(WebCore::startReadableStream):
(WebCore::JSReadableStreamSource::start):
(WebCore::pullReadableStream): Introduced to support ReadableStreamSource pulling.
(WebCore::JSReadableStreamSource::pull): Ditto.
* bindings/js/WebCoreBuiltinNames.h: Removing firstReadCallback

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/fetch/FetchResponseSource.cpp
Source/WebCore/Modules/fetch/FetchResponseSource.h
Source/WebCore/Modules/streams/ReadableStreamInternals.js
Source/WebCore/Modules/streams/ReadableStreamSource.h
Source/WebCore/Modules/streams/ReadableStreamSource.idl
Source/WebCore/bindings/js/JSReadableStreamSourceCustom.cpp
Source/WebCore/bindings/js/WebCoreBuiltinNames.h