From 6913f06b6f8c58be771caa5af155d775e570aa73 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Sat, 12 Jun 2021 17:32:54 +0300 Subject: 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. --- Userland/Libraries/LibJS/Interpreter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Userland/Libraries/LibJS/Interpreter.cpp') diff --git a/Userland/Libraries/LibJS/Interpreter.cpp b/Userland/Libraries/LibJS/Interpreter.cpp index 1c6ef8f73a..63acef125c 100644 --- a/Userland/Libraries/LibJS/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Interpreter.cpp @@ -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() -- cgit v1.2.3