mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibJS: Split inline frames from execution context stack
Keep JS-to-JS inline calls out of m_execution_context_stack and walk the active stack from the running execution context instead. Base pushes now record the previous running context so duplicate TemporaryExecutionContext pushes and host re-entry still restore correctly. This keeps the fast JS-to-JS path off the vector without losing GC root collection, stack traces, or helpers that need to inspect the active execution context chain.
This commit is contained in:
committed by
Andreas Kling
parent
2ca7dfa649
commit
9af5508aef
Notes:
github-actions[bot]
2026-04-13 16:31:17 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/9af5508aef9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8891 Reviewed-by: https://github.com/shannonbooth
@@ -218,11 +218,10 @@ void AsyncGenerator::execute(VM& vm, Completion completion)
|
||||
auto yield_completion = normal_completion(value);
|
||||
|
||||
// 6. Assert: The execution context stack has at least two elements.
|
||||
VERIFY(vm.execution_context_stack().size() >= 2);
|
||||
auto* previous_context = vm.previous_execution_context();
|
||||
VERIFY(previous_context);
|
||||
|
||||
// 7. Let previousContext be the second to top element of the execution context stack.
|
||||
auto& previous_context = vm.execution_context_stack().at(vm.execution_context_stack().size() - 2);
|
||||
|
||||
// 8. Let previousRealm be previousContext's Realm.
|
||||
auto previous_realm = previous_context->realm;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user