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

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

Issue 2512103002: [async-await] Don't create resolving callbacks for throwaway promises (Closed)
Patch Set: rename to CreateInternalPromiseCapability Created 4 years, 1 month 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 | « no previous file | src/js/promise.js » ('j') | no next file with comments »
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 a1cac0d5cd62a6bb6850197db285460cf06681ea..0723f7ecfeba921039b1e47bbaa299f3381452c3 100644
--- a/src/js/async-await.js
+++ b/src/js/async-await.js
@@ -15,7 +15,7 @@ var AsyncFunctionNext;
var AsyncFunctionThrow;
var GlobalPromise;
var IsPromise;
-var NewPromiseCapability;
+var CreateInternalPromiseCapability;
var PerformPromiseThen;
var PromiseCreate;
var PromiseNextMicrotaskID;
@@ -27,7 +27,7 @@ utils.Import(function(from) {
AsyncFunctionThrow = from.AsyncFunctionThrow;
GlobalPromise = from.GlobalPromise;
IsPromise = from.IsPromise;
- NewPromiseCapability = from.NewPromiseCapability;
+ CreateInternalPromiseCapability = from.CreateInternalPromiseCapability;
PerformPromiseThen = from.PerformPromiseThen;
PromiseCreate = from.PromiseCreate;
RejectPromise = from.RejectPromise;
@@ -90,8 +90,8 @@ function AsyncFunctionAwait(generator, awaited, outerPromise) {
return;
}
- // Just forwarding the exception, so no debugEvent for throwawayCapability
- var throwawayCapability = NewPromiseCapability(GlobalPromise, false);
+ // Just forwarding the exception, so no debugEvent for throwawayCapability.
+ var throwawayCapability = CreateInternalPromiseCapability();
// The Promise will be thrown away and not handled, but it shouldn't trigger
// unhandled reject events as its work is done
« no previous file with comments | « no previous file | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698