Step of Abstract Closure is specifed incorrectly in NewPromiseResolveThenableJob
If you look at NewPromiseResolveThenableJob you will see next steps:
b. Let thenCallResult be Completion(HostCallJobCallback(then, thenable, « resolvingFunctions.[[Resolve]], resolvingFunctions.[[Reject]] »)).
c. If thenCallResult is an abrupt completion, then
i. Return ? Call(resolvingFunctions.[[Reject]], undefined, « thenCallResult.[[Value]] »).
d. Return ? thenCallResult.
If I don't mistake step d specified incorrect. As I know sign ? means operation ReturnIfAbrupt that also shows that value can be abrupt completion. But here step d can't be abrupt completion because previous step protect from abruption. So I think step d should be written as:
d. Return ! thenCallResult
What do you think?
It can also just be Return thenCallResult.[[Value]], since we know that thenCallResult is a Completion and it's obvious (from step c) that it's not an abrupt completion, even without asserting.
@nicolo-ribaudo sure, I just noticed an inconsistency. In old spec it was Completion(thenCallResult).