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

Unified Diff: src/js/promise.js

Issue 2442373002: [promises] remove if kPending check (Closed)
Patch Set: Created 4 years, 2 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 af1336c0141a9364bf07d13a321874243ee0d46e..36c3af75e816892b329a9569a8a04d3e37947664 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -143,14 +143,12 @@ function PromiseInit(promise) {
}
function FulfillPromise(promise, status, value, promiseQueue) {
- if (GET_PRIVATE(promise, promiseStateSymbol) === kPending) {
- var tasks = GET_PRIVATE(promise, promiseQueue);
- if (!IS_UNDEFINED(tasks)) {
- var deferred = GET_PRIVATE(promise, promiseDeferredReactionSymbol);
- PromiseEnqueue(value, tasks, deferred, status);
- }
- PromiseSet(promise, status, value);
+ var tasks = GET_PRIVATE(promise, promiseQueue);
+ if (!IS_UNDEFINED(tasks)) {
+ var deferred = GET_PRIVATE(promise, promiseDeferredReactionSymbol);
+ PromiseEnqueue(value, tasks, deferred, status);
}
+ PromiseSet(promise, status, value);
}
function PromiseHandle(value, handler, deferred) {
« 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