Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index 7e0ad4906f798f2b8d36fd3a410e8c8db0637c9e..fb3a3d78cf2800adf4768c84395190f842150447 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -142,11 +142,6 @@ function PromiseInit(promise) { |
return PromiseSet(promise, kPending, UNDEFINED); |
} |
-function FulfillPromise(promise, status, value, promiseQueue) { |
- %PromiseFulfill(promise, status, value, promiseQueue); |
- PromiseSet(promise, status, value); |
-} |
- |
function PromiseHandle(value, handler, deferred) { |
var debug_is_active = DEBUG_IS_ACTIVE; |
try { |
@@ -269,8 +264,9 @@ function ResolvePromise(promise, resolution) { |
// This goes inside the if-else to save one symbol lookup in |
// the slow path. |
var thenableValue = GET_PRIVATE(resolution, promiseResultSymbol); |
- FulfillPromise(promise, kFulfilled, thenableValue, |
+ %PromiseFulfill(promise, kFulfilled, thenableValue, |
promiseFulfillReactionsSymbol); |
+ PromiseSet(promise, kFulfilled, thenableValue); |
SET_PRIVATE(promise, promiseHasHandlerSymbol, true); |
return; |
} else if (thenableState === kRejected) { |
@@ -298,8 +294,9 @@ function ResolvePromise(promise, resolution) { |
return; |
} |
} |
- FulfillPromise(promise, kFulfilled, resolution, |
- promiseFulfillReactionsSymbol); |
+ %PromiseFulfill(promise, kFulfilled, resolution, |
+ promiseFulfillReactionsSymbol); |
+ PromiseSet(promise, kFulfilled, resolution); |
} |
// ES#sec-rejectpromise |
@@ -318,7 +315,8 @@ function RejectPromise(promise, reason, debugEvent) { |
%PromiseRejectEvent(promise, reason, debugEvent); |
} |
} |
- FulfillPromise(promise, kRejected, reason, promiseRejectReactionsSymbol) |
+ %PromiseFulfill(promise, kRejected, reason, promiseRejectReactionsSymbol) |
+ PromiseSet(promise, kRejected, reason); |
} |
// Export to bindings |