mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
The AsyncIteratorClose bytecode op calls async_iterator_close() which uses synchronous await() internally. This spins the event loop while execution contexts are on the stack, violating the microtask checkpoint assertion in LibWeb. Replace AsyncIteratorClose op emissions in for-await-of close handlers with inline bytecode that uses the proper Await op, allowing the async function to yield and resume naturally through the event loop. For the non-throw path (break/return/continue-to-outer): emit GetMethod, Call, Await, and ThrowIfNotObject inline. For the throw path: wrap the close steps in an exception handler so that any error from GetMethod/Call/Await is discarded and the original exception is rethrown, per spec step 5.