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

Side by Side Diff: src/js/promise.js

Issue 2209773003: [promises] remove duplicate var initialization (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 function PromiseInit(promise) { 141 function PromiseInit(promise) {
142 return PromiseSet(promise, kPending, UNDEFINED); 142 return PromiseSet(promise, kPending, UNDEFINED);
143 } 143 }
144 144
145 function FulfillPromise(promise, status, value, promiseQueue) { 145 function FulfillPromise(promise, status, value, promiseQueue) {
146 if (GET_PRIVATE(promise, promiseStateSymbol) === kPending) { 146 if (GET_PRIVATE(promise, promiseStateSymbol) === kPending) {
147 var tasks = GET_PRIVATE(promise, promiseQueue); 147 var tasks = GET_PRIVATE(promise, promiseQueue);
148 if (!IS_UNDEFINED(tasks)) { 148 if (!IS_UNDEFINED(tasks)) {
149 var tasks = GET_PRIVATE(promise, promiseQueue);
150 var deferreds = GET_PRIVATE(promise, promiseDeferredReactionsSymbol); 149 var deferreds = GET_PRIVATE(promise, promiseDeferredReactionsSymbol);
151 PromiseEnqueue(value, tasks, deferreds, status); 150 PromiseEnqueue(value, tasks, deferreds, status);
152 } 151 }
153 PromiseSet(promise, status, value); 152 PromiseSet(promise, status, value);
154 } 153 }
155 } 154 }
156 155
157 function PromiseHandle(value, handler, deferred) { 156 function PromiseHandle(value, handler, deferred) {
158 var debug_is_active = DEBUG_IS_ACTIVE; 157 var debug_is_active = DEBUG_IS_ACTIVE;
159 try { 158 try {
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 to.PromiseChain = PromiseChain; 618 to.PromiseChain = PromiseChain;
620 to.PromiseDefer = PromiseDefer; 619 to.PromiseDefer = PromiseDefer;
621 to.PromiseAccept = PromiseAccept; 620 to.PromiseAccept = PromiseAccept;
622 621
623 to.PromiseCreateRejected = PromiseCreateRejected; 622 to.PromiseCreateRejected = PromiseCreateRejected;
624 to.PromiseCreateResolved = PromiseCreateResolved; 623 to.PromiseCreateResolved = PromiseCreateResolved;
625 to.PromiseThen = PromiseThen; 624 to.PromiseThen = PromiseThen;
626 }); 625 });
627 626
628 }) 627 })
OLDNEW
« 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