Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Unified Diff: src/js/async-await.js

Issue 2541283002: [promises] Port ResolvePromise to TF (Closed)
Patch Set: fix nits Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-symbols.h ('k') | src/js/promise.js » ('j') | src/js/promise.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/async-await.js
diff --git a/src/js/async-await.js b/src/js/async-await.js
index f05feb293695ff679456814c8a74fe0d11c5bf89..c7e90510d1c830d4e03a2b4d0bd150637a4773e6 100644
--- a/src/js/async-await.js
+++ b/src/js/async-await.js
@@ -17,7 +17,6 @@ var CreateInternalPromiseCapability;
var PromiseCreate;
var PromiseNextMicrotaskID;
var RejectPromise;
-var ResolvePromise;
utils.Import(function(from) {
AsyncFunctionNext = from.AsyncFunctionNext;
@@ -25,7 +24,6 @@ utils.Import(function(from) {
CreateInternalPromiseCapability = from.CreateInternalPromiseCapability;
PromiseCreate = from.PromiseCreate;
RejectPromise = from.RejectPromise;
- ResolvePromise = from.ResolvePromise;
});
var promiseAsyncStackIDSymbol =
@@ -36,8 +34,6 @@ var promiseForwardingHandlerSymbol =
utils.ImportNow("promise_forwarding_handler_symbol");
var promiseHandledHintSymbol =
utils.ImportNow("promise_handled_hint_symbol");
-var promiseHasHandlerSymbol =
- utils.ImportNow("promise_has_handler_symbol");
// -------------------------------------------------------------------
@@ -47,7 +43,7 @@ function PromiseCastResolved(value) {
return value;
} else {
var promise = PromiseCreate();
- ResolvePromise(promise, value);
+ %promise_resolve(promise, value);
return promise;
}
}
@@ -90,7 +86,7 @@ function AsyncFunctionAwait(generator, awaited, outerPromise) {
// 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);
+ %PromiseMarkAsHandled(throwawayCapability.promise);
if (DEBUG_IS_ACTIVE) {
if (%is_promise(awaited)) {
« no previous file with comments | « src/heap-symbols.h ('k') | src/js/promise.js » ('j') | src/js/promise.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698