You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AsyncBlockStart step 5 transfers control into an async function, which (unless it completes without awaiting) transfers it back by hitting Await step 10.
But Await step 10 resumes the outer context with ~empty~, and AsyncBlockStart step 7 asserts that it has been resumed with NormalCompletion(~unused~). They should match. And specifically it needs to be a normal completion because the abstract closure crated by NewPromiseReactionJob generally returns completion records.
I believe we introduced this mismatch in #2665: prior to that PR Await would Return NormalCompletion(~unused~), and subsequently it would Resume _callerContext_ passing ~empty~.
Also, we could maybe stand to give more details about where control transfers of this kind can go. It's nice that AsyncBlockStart mentions the two possible places it can be resumed from, though it could stand to mention the relevant step of Await, not merely name the AO. Also, Await could mention that it returns either to AsyncBlockStart or, in the case of awaits after the first, is returning to the host steps which triggered it to run after the previous await (e.g. in HTML). The generator machinery is slightly simpler but could also benefit from such notes.
The text was updated successfully, but these errors were encountered:
AsyncBlockStart step 5 transfers control into an async function, which (unless it completes without
await
ing) transfers it back by hitting Await step 10.But Await step 10 resumes the outer context with
~empty~
, and AsyncBlockStart step 7 asserts that it has been resumed withNormalCompletion(~unused~)
. They should match. And specifically it needs to be a normal completion because the abstract closure crated by NewPromiseReactionJob generally returns completion records.I believe we introduced this mismatch in #2665: prior to that PR Await would
Return NormalCompletion(~unused~)
, and subsequently it wouldResume _callerContext_ passing ~empty~
.Also, we could maybe stand to give more details about where control transfers of this kind can go. It's nice that AsyncBlockStart mentions the two possible places it can be resumed from, though it could stand to mention the relevant step of Await, not merely name the AO. Also, Await could mention that it returns either to AsyncBlockStart or, in the case of
await
s after the first, is returning to the host steps which triggered it to run after the previousawait
(e.g. in HTML). The generator machinery is slightly simpler but could also benefit from such notes.The text was updated successfully, but these errors were encountered: