Index: src/js/harmony-async-await.js |
diff --git a/src/js/harmony-async-await.js b/src/js/harmony-async-await.js |
index 192e041e554fbf8d4a1811848ffa801a94cc695f..203ca88f12201df3fe3a013bed3bc2f8bb61b006 100644 |
--- a/src/js/harmony-async-await.js |
+++ b/src/js/harmony-async-await.js |
@@ -17,6 +17,7 @@ var GlobalPromise; |
var NewPromiseCapability; |
var PerformPromiseThen; |
var PromiseCastResolved; |
+var RejectPromise; |
utils.Import(function(from) { |
AsyncFunctionNext = from.AsyncFunctionNext; |
@@ -25,6 +26,7 @@ utils.Import(function(from) { |
NewPromiseCapability = from.NewPromiseCapability; |
PromiseCastResolved = from.PromiseCastResolved; |
PerformPromiseThen = from.PerformPromiseThen; |
+ RejectPromise = from.RejectPromise; |
}); |
// ------------------------------------------------------------------- |
@@ -47,6 +49,14 @@ function AsyncFunctionAwait(generator, value) { |
throwawayCapability); |
} |
-%InstallToContext([ "async_function_await", AsyncFunctionAwait ]); |
+// How the parser rejects promises from async/await desugaring |
+function RejectPromiseNoDebugEvent(promise, reason) { |
+ return RejectPromise(promise, reason, false); |
+} |
+ |
+%InstallToContext([ |
+ "async_function_await", AsyncFunctionAwait, |
+ "reject_promise_no_debug_event", RejectPromiseNoDebugEvent, |
+]); |
}) |