Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index fb3a3d78cf2800adf4768c84395190f842150447..48200663e3565abe33af3eb9293b6a4a1e29c8dd 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -302,18 +302,15 @@ function ResolvePromise(promise, resolution) { |
// ES#sec-rejectpromise |
// RejectPromise ( promise, reason ) |
function RejectPromise(promise, reason, debugEvent) { |
- // Check promise status to confirm that this reject has an effect. |
// Call runtime for callbacks to the debugger or for unhandled reject. |
// The debugEvent parameter sets whether a debug ExceptionEvent should |
// be triggered. It should be set to false when forwarding a rejection |
// rather than creating a new one. |
- if (GET_PRIVATE(promise, promiseStateSymbol) === kPending) { |
- // This check is redundant with checks in the runtime, but it may help |
- // avoid unnecessary runtime calls. |
- if ((debugEvent && DEBUG_IS_ACTIVE) || |
- !HAS_DEFINED_PRIVATE(promise, promiseHasHandlerSymbol)) { |
+ // This check is redundant with checks in the runtime, but it may help |
+ // avoid unnecessary runtime calls. |
+ if ((debugEvent && DEBUG_IS_ACTIVE) || |
+ !HAS_DEFINED_PRIVATE(promise, promiseHasHandlerSymbol)) { |
%PromiseRejectEvent(promise, reason, debugEvent); |
adamk
2016/10/26 12:05:00
Nit: indentation is off.
|
- } |
} |
%PromiseFulfill(promise, kRejected, reason, promiseRejectReactionsSymbol) |
PromiseSet(promise, kRejected, reason); |