Index: src/js/async-await.js |
diff --git a/src/js/async-await.js b/src/js/async-await.js |
index 732d5abb94c7d4e64b36f0a008887534d65a4c22..a2923f43c4db8dd2cf04599d00047d14b9416d37 100644 |
--- a/src/js/async-await.js |
+++ b/src/js/async-await.js |
@@ -13,15 +13,10 @@ |
var AsyncFunctionNext; |
var AsyncFunctionThrow; |
-var PromiseCreate; |
-var PromiseNextMicrotaskID; |
-var RejectPromise; |
utils.Import(function(from) { |
AsyncFunctionNext = from.AsyncFunctionNext; |
AsyncFunctionThrow = from.AsyncFunctionThrow; |
- PromiseCreate = from.PromiseCreate; |
- RejectPromise = from.RejectPromise; |
}); |
var promiseAsyncStackIDSymbol = |
@@ -38,7 +33,7 @@ function PromiseCastResolved(value) { |
if (%is_promise(value)) { |
return value; |
} else { |
- var promise = PromiseCreate(UNDEFINED); |
+ var promise = %promise_internal_constructor(UNDEFINED); |
%promise_resolve(promise, value); |
return promise; |
} |
@@ -77,7 +72,7 @@ function AsyncFunctionAwait(generator, awaited, outerPromise) { |
return; |
} |
- var throwawayPromise = PromiseCreate(promise); |
+ var throwawayPromise = %promise_internal_constructor(promise); |
// The Promise will be thrown away and not handled, but it shouldn't trigger |
// unhandled reject events as its work is done |
@@ -115,11 +110,11 @@ function AsyncFunctionAwaitCaught(generator, awaited, outerPromise) { |
// How the parser rejects promises from async/await desugaring |
function RejectPromiseNoDebugEvent(promise, reason) { |
- return RejectPromise(promise, reason, false); |
+ return %PromiseReject(promise, reason, false); |
} |
function AsyncFunctionPromiseCreate() { |
- var promise = PromiseCreate(); |
+ var promise = %promise_internal_constructor(UNDEFINED); |
if (DEBUG_IS_ACTIVE) { |
// Push the Promise under construction in an async function on |
// the catch prediction stack to handle exceptions thrown before |