[Streams API] Rework promises to use @newPromiseCapability
authorcalvaris@igalia.com <calvaris@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 14:52:04 +0000 (14:52 +0000)
committercalvaris@igalia.com <calvaris@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 14:52:04 +0000 (14:52 +0000)
commit6c04b855f6a076cc1be46ecbca9a98759096cda0
tree87d6fccd3e27aad9f9910c2dca9ca764755eab2d
parent5319e0e7e46e65f84f5544b049a468f4c1121598
[Streams API] Rework promises to use @newPromiseCapability
https://bugs.webkit.org/show_bug.cgi?id=150627

Reviewed by Youenn Fablet.

We are removing the stream promises functions in favor of @newPromiseCapabity which basically provides the same
functionality (keeping the resolve and reject functions without external slots). Slots and variables were
renamed as *PromiseCapability to show that they no longer hold just a promise, but a promise capability.

Internal rework, no new tests needed.

* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader.this.closedPromiseCapability.resolve):
(privateInitializeReadableStreamReader.this.closedPromiseCapability.reject):
(privateInitializeReadableStreamReader):
(teeReadableStream):
(teeReadableStreamBranch2CancelFunction):
(errorReadableStream):
(closeReadableStreamReader):
(enqueueInReadableStream):
(readFromReadableStreamReader):
* Modules/streams/ReadableStreamReader.js:
(closed):
* Modules/streams/StreamInternals.js:
(createNewStreamsPromise): Deleted.
(resolveStreamsPromise): Deleted.
(rejectStreamsPromise): Deleted.
* Modules/streams/WritableStream.js:
(this.readyPromiseCapability.resolve):
(this.readyPromiseCapability.reject):
(initializeWritableStream):
(close):
(write):
(closed):
(ready):
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue):
(errorWritableStream):
* bindings/js/WebCoreBuiltinNames.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/streams/ReadableStreamInternals.js
Source/WebCore/Modules/streams/ReadableStreamReader.js
Source/WebCore/Modules/streams/StreamInternals.js
Source/WebCore/Modules/streams/WritableStream.js
Source/WebCore/Modules/streams/WritableStreamInternals.js
Source/WebCore/bindings/js/WebCoreBuiltinNames.h