tc39/proposal-promise-allSettled

Clarify [[AlreadyCalled]]

Closed this issue · 3 comments

https://github.com/jasonwilliams/proposal-promise-allSettled/blob/b56ce24c0c970627cc2e2853046dd3fa7bf5c3af/spec.html#L61

          1. **WHY IS THIS NEEDED?** Set _resolveElement_.[[AlreadyCalled]] to _alreadyCalled_.

Ref. #18.

@domenic Could you please elaborate on the usage of [[AlreadyCalled]] in e.g. https://tc39.github.io/ecma262/#sec-promise.all-resolve-element-functions?

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:

Ok thanks, myself and Rob have taken a look through this and i think we understand the issue