Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index b47472aa07f88e6d3638f08cd6085f2033c6bab2..86be06018ce7230dd54a9d7179db9dbd5fa365fa 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -172,7 +172,7 @@ function PromiseHandle(value, handler, deferred) { |
if (IS_UNDEFINED(deferred.resolve)) { |
ResolvePromise(deferred.promise, result); |
} else { |
- deferred.resolve(result); |
+ %_Call(deferred.resolve, UNDEFINED, result); |
} |
} %catch (exception) { // Natives syntax to mark this catch block. |
try { |
@@ -181,7 +181,7 @@ function PromiseHandle(value, handler, deferred) { |
// redundant ExceptionEvents. |
RejectPromise(deferred.promise, exception, false); |
} else { |
- deferred.reject(exception); |
+ %_Call(deferred.reject, UNDEFINED, exception); |
} |
} catch (e) { } |
} finally { |
@@ -606,7 +606,7 @@ function PromiseRace(iterable) { |
} |
} |
} catch (e) { |
- deferred.reject(e) |
+ %_Call(deferred.reject, UNDEFINED, e); |
} |
return deferred.promise; |
} |