Re: [promises] resolver's resolved flag check on promise callback

On Thu, Jun 27, 2013 at 2:51 AM, Yutaka Hirano <yhirano@chromium.org> wrote:
> Hi, I am implementing promises and I have a question.
> In resolve algorithm, we create promise callbacks for the given resolver and
> pass them to a (possibly) user defined function.
> A user can call them more than once.
> Since a promise callback for |resolver| and |algorithm| runs |resolver|'s
> |algorithm| and the |algorithm| doesn't checks |resolver|'s resolved flag,
> it seems that the promise can be resolved or rejected multiple times.
> Is it correct? I think the check for the resolved flag is needed in:
>  - promise callback
>  - 4.4 in resolve algorithm.

What do you mean by 4.4? I think you're right that this is
problematic, but it's not entirely clear to me this solves it.


--
http://annevankesteren.nl/

Received on Friday, 28 June 2013 13:53:48 UTC