- From: Mattias Buelens <notifications@github.com>
- Date: Tue, 20 Aug 2019 10:43:30 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 20 August 2019 17:43:53 UTC
MattiasBuelens commented on this pull request.
> @@ -157,11 +157,38 @@ exports.MakeSizeAlgorithmFromSizeFunction = size => {
return chunk => size(chunk);
};
-exports.PerformPromiseThen = (promise, onFulfilled, onRejected) => {
+const originalPromise = Promise;
+const originalPromiseThen = Promise.prototype.then;
+const originalPromiseResolve = Promise.resolve;
+const originalPromiseReject = Promise.reject;
+
+function CreatePromise(executor) {
+ return new originalPromise(executor);
+}
+
+function PromiseResolve(value) {
+ return originalPromiseResolve.call(originalPromise, value);
+}
+
+function PromiseReject(reason) {
Sounds reasonable. I'll rename them. 🙂
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/1010#discussion_r315819463
Received on Tuesday, 20 August 2019 17:43:53 UTC