[Streams API] ReadableStreamReader.closed should use DOMPromise
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jun 2015 06:47:19 +0000 (06:47 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Jun 2015 06:47:19 +0000 (06:47 +0000)
commitf8242ea487fdb524bd9a684d22065b7ba04843ca
tree87e614e0f3bb914197c33d30235d1ec209173b27
parent02e12f80f452bca27d6a9b0d866731ca3c052f7e
[Streams API] ReadableStreamReader.closed should use DOMPromise
https://bugs.webkit.org/show_bug.cgi?id=146406

Reviewed by Darin Adler.

Added storage of ClosedPromise as Optional of ReadableStream.
Updated code accordingly.

Covered by existing tests.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::clearCallbacks):
(WebCore::ReadableStream::releaseReader):
(WebCore::ReadableStream::changeStateToErrored):
(WebCore::ReadableStream::closed):
* Modules/streams/ReadableStream.h:
* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::closed):
* Modules/streams/ReadableStreamReader.h:
* bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::JSReadableStreamReader::closed):

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