domenic / promises-unwrapping

The ES6 promises spec, as per September 2013 TC39 meeting
1.23k stars 94 forks source link

PropagateToDerived should not have to ReturnIfAbrupt #60

Closed jorendorff closed 10 years ago

jorendorff commented 10 years ago

The ReturnIfAbrupt call in the loop in PropagateToDerived looks awfully suspicious to me. It's important to finish, and it's important not to reenter, so returning abruptly there should never happen.

It looks like UpdateDerived is infallible; anything that could fail is scheduled for a later microtask. So I think the ReturnIfAbrupt call can just be removed.

domenic commented 10 years ago

It looks like UpdateDerived is infallible; anything that could fail is scheduled for a later microtask.

I believe this is correct; I remember when adding the ReturnIfAbrupts that I was unsure about its utility in this case.

So I think the ReturnIfAbrupt call can just be removed.

Sounds like a plan, thanks.