Chromium Code Reviews| Index: src/js/promise.js |
| diff --git a/src/js/promise.js b/src/js/promise.js |
| index 86be06018ce7230dd54a9d7179db9dbd5fa365fa..4227a7efff5a5fd9c419b3b197948144e0251ef6 100644 |
| --- a/src/js/promise.js |
| +++ b/src/js/promise.js |
| @@ -128,15 +128,10 @@ function PromiseSet(promise, status, value) { |
| SET_PRIVATE(promise, promiseFulfillReactionsSymbol, UNDEFINED); |
| SET_PRIVATE(promise, promiseRejectReactionsSymbol, UNDEFINED); |
| - // There are 2 possible states for this symbol -- |
| - // 1) UNDEFINED -- This is the zero state, no deferred object is |
| - // attached to this symbol. When we want to add a new deferred we |
| - // directly attach it to this symbol. |
| - // 2) symbol with attached deferred object -- New deferred objects |
| - // are not attached to this symbol, but instead they are directly |
| - // attached to the resolve, reject callback arrays. At this point, |
| - // the deferred symbol's state is stale, and the deferreds should be |
| - // read from the reject, resolve callbacks. |
| + // This symbol is used only when one deferred needs to be attached. When more |
| + // than one deferred need to be attached the promise, we attach them directly |
| + // to the promiseFulfillReactionsSymbol and promiseRejectReactionsSymbol and |
| + // reset this back to UNDEFINED. |
| SET_PRIVATE(promise, promiseDeferredReactionsSymbol, UNDEFINED); |
|
adamk
2016/10/10 19:19:32
Can you rename the symbol to match its usage? And
|
| return promise; |