Clarify [[AlreadyCalled]]
Closed this issue · 3 comments
mathiasbynens commented
1. **WHY IS THIS NEEDED?** Set _resolveElement_.[[AlreadyCalled]] to _alreadyCalled_.
Ref. #18.
mathiasbynens commented
@domenic Could you please elaborate on the usage of [[AlreadyCalled]]
in e.g. https://tc39.github.io/ecma262/#sec-promise.all-resolve-element-functions?
domenic commented
I think it's to work around potential promise subclasses or similar that, given p.then(f, r)
, might call f
multiple times.
I haven't read the following links recently myself, but they look promising:
jasonwilliams commented
Ok thanks, myself and Rob have taken a look through this and i think we understand the issue