Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the same promise from being resolved twice.
Question: Couldn’t R.[[Promise]].[[PromiseState]] be used, instead?
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createresolvingfunctions
Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the same promise from being resolved twice.
Question: Couldn’t R.[[Promise]].[[PromiseState]] be used, instead?
--
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140925/abc6ebb5/attachment.html>
A promise is resolved if it is settled or if it has been "locked in" to match the state of another promise. Attempting to resolve or reject a resolved promise has no effect.
Figured it out: This is needed for “locking in”.
Quoting [1]:
> A promise is _resolved_ if it is settled or if it has been "locked in" to match the state of another promise. Attempting to resolve or reject a resolved promise has no effect.
[1] https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects
On Sep 25, 2014, at 6:49 , Axel Rauschmayer <axel at rauschma.de> wrote:
> https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createresolvingfunctions
>
> Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the same promise from being resolved twice.
>
> Question: Couldn’t R.[[Promise]].[[PromiseState]] be used, instead?
--
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140925/51194aaf/attachment.html>
people.mozilla.org/~jorendorff/es6-draft.html#sec-createresolvingfunctions
Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the same promise from being resolved twice.
Question: Couldn’t R.[[Promise]].[[PromiseState]] be used, instead?