Index: src/js/harmony-async-await.js |
diff --git a/src/js/harmony-async-await.js b/src/js/harmony-async-await.js |
index 4109b77fb54174366cdae648b0dae7fc0c5b02af..396ebdc750a8c865f8007592a9a7ce518ba88d9a 100644 |
--- a/src/js/harmony-async-await.js |
+++ b/src/js/harmony-async-await.js |
@@ -36,6 +36,8 @@ utils.Import(function(from) { |
var promiseAwaitHandlerSymbol = utils.ImportNow("promise_await_handler_symbol"); |
var promiseHandledHintSymbol = |
utils.ImportNow("promise_handled_hint_symbol"); |
+var promiseHasHandlerSymbol = |
+ utils.ImportNow("promise_has_handler_symbol"); |
// ------------------------------------------------------------------- |
@@ -77,6 +79,11 @@ function AsyncFunctionAwait(generator, awaited, mark) { |
// Just forwarding the exception, so no debugEvent for throwawayCapability |
var throwawayCapability = NewPromiseCapability(GlobalPromise, false); |
+ |
+ // The Promise will be thrown away and not handled, but it shouldn't trigger |
+ // unhandled reject events as its work is done |
+ SET_PRIVATE(throwawayCapability.promise, promiseHasHandlerSymbol, true); |
+ |
return PerformPromiseThen(promise, onFulfilled, onRejected, |
throwawayCapability); |
} |