1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibJS: Store and maintain an "execution generation" counter

This counter is increased each time a synchronous execution sequence
completes, and will allow us to emulate the abstract operations
AddToKeptObjects & ClearKeptObjects efficiently.
This commit is contained in:
Idan Horowitz 2021-06-12 17:32:54 +03:00 committed by Linus Groh
parent 8a739f986a
commit 6913f06b6f
4 changed files with 11 additions and 0 deletions

View file

@ -63,6 +63,8 @@ void Interpreter::run(GlobalObject& global_object, const Program& program)
// At this point we may have already run any queued promise jobs via on_call_stack_emptied,
// in which case this is a no-op.
vm.run_queued_promise_jobs();
vm.finish_execution_generation();
}
GlobalObject& Interpreter::global_object()