diff --git a/Userland/Libraries/LibJS/Interpreter.cpp b/Userland/Libraries/LibJS/Interpreter.cpp index ef7cb8a628..513e5a9f91 100644 --- a/Userland/Libraries/LibJS/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Interpreter.cpp @@ -74,7 +74,7 @@ ThrowCompletionOr Interpreter::run(Script& script_record) // FIXME: 9. Suspend the currently running execution context. // 10. Push scriptContext onto the execution context stack; scriptContext is now the running execution context. - vm.push_execution_context(script_context, global_object); + TRY(vm.push_execution_context(script_context, global_object)); // 11. Let scriptBody be scriptRecord.[[ECMAScriptCode]]. auto& script_body = script_record.parse_node(); diff --git a/Userland/Libraries/LibJS/SourceTextModule.cpp b/Userland/Libraries/LibJS/SourceTextModule.cpp index 406a318e65..ba9197d6a1 100644 --- a/Userland/Libraries/LibJS/SourceTextModule.cpp +++ b/Userland/Libraries/LibJS/SourceTextModule.cpp @@ -404,7 +404,7 @@ Completion SourceTextModule::initialize_environment(VM& vm) // Note: We're already working on that one. // 17. Push moduleContext onto the execution context stack; moduleContext is now the running execution context. - vm.push_execution_context(m_execution_context, realm().global_object()); + TRY(vm.push_execution_context(m_execution_context, realm().global_object())); // 18. Let code be module.[[ECMAScriptCode]]. @@ -657,7 +657,7 @@ Completion SourceTextModule::execute_module(VM& vm, Optional // a. Assert: capability is not present. VERIFY(!capability.has_value()); // b. Push moduleContext onto the execution context stack; moduleContext is now the running execution context. - vm.push_execution_context(module_context, realm().global_object()); + TRY(vm.push_execution_context(module_context, realm().global_object())); // c. Let result be the result of evaluating module.[[ECMAScriptCode]]. auto result = m_ecmascript_code->execute(vm.interpreter(), realm().global_object()); diff --git a/Userland/Libraries/LibJS/SyntheticModule.cpp b/Userland/Libraries/LibJS/SyntheticModule.cpp index b16c821103..f0c8878d6b 100644 --- a/Userland/Libraries/LibJS/SyntheticModule.cpp +++ b/Userland/Libraries/LibJS/SyntheticModule.cpp @@ -98,7 +98,7 @@ ThrowCompletionOr JS::SyntheticModule::evaluate(VM& vm) module_context.lexical_environment = environment(); // 8. Push moduleContext on to the execution context stack; moduleContext is now the running execution context. - vm.push_execution_context(module_context, realm().global_object()); + TRY(vm.push_execution_context(module_context, realm().global_object())); // 9. Let result be the result of performing module.[[EvaluationSteps]](module). auto result = m_evaluation_steps(*this);