Re: [promises] resolver's resolved flag check on promise callback
Anne van Kesteren <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <CADnb78j-QpsAnwGSKei4wea_4=jd3tLmX4P7ieTK40PSSAevHA@mail.gmail.com> |
On Tue, Jul 2, 2013 at 2:19 AM, Yutaka Hirano <[email protected]> wrote: > If so, can we have the state check in fulfill / reject algorithms? I guess having the check there, in addition to making sure the public methods can each only be invoked once, is probably about right. You could still get something weird if someone gets passed a resolve and reject callback and invokes them both, resolve first with a promise and then reject, as in that case reject would win, but given they're invoking methods more than once, maybe that's okay? Or maybe there's a better way still? -- http://annevankesteren.nl/