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

Unified Diff: src/js/promise.js

Issue 2376613003: [promises] Use PromiseCreate when applicable (Closed)
Patch Set: Created 4 years, 3 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/promise.js
diff --git a/src/js/promise.js b/src/js/promise.js
index 348d5fb93ebf5de4625f7815629c0bca7ecef209..793d60fb0a7fa29f5f828da7dee849d5d42dabb1 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -370,7 +370,7 @@ function DoRejectPromise(promise, reason) {
function NewPromiseCapability(C, debugEvent) {
if (C === GlobalPromise) {
// Optimized case, avoid extra closure.
- var promise = PromiseInit(new GlobalPromise(promiseRawSymbol));
+ var promise = PromiseCreate();
var callbacks = CreateResolvingFunctions(promise, debugEvent);
return {
promise: promise,
@@ -476,7 +476,7 @@ function PromiseResolve(x) {
// Avoid creating resolving functions.
if (this === GlobalPromise) {
- var promise = PromiseInit(new GlobalPromise(promiseRawSymbol));
+ var promise = PromiseCreate();
var resolveResult = ResolvePromise(promise, x);
return promise;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698