From 6fc9de7aabc06748235f9502bc14cf34f6eb472b Mon Sep 17 00:00:00 2001 From: devgianlu Date: Sat, 5 Apr 2025 19:46:27 +0200 Subject: [PATCH] LibJS: Remove invalid call to `realm()` on bytecode generator error There is no realm when that call happens, use the same logic as the lines above to create an error from the VM alone. --- Libraries/LibJS/Bytecode/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibJS/Bytecode/Interpreter.cpp b/Libraries/LibJS/Bytecode/Interpreter.cpp index 31b2e95a402..987e5ec8d3b 100644 --- a/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -257,7 +257,7 @@ ThrowCompletionOr Interpreter::run(Script& script_record, GC::Ptr(vm.error_message(JS::VM::ErrorMessage::OutOfMemory)); else - result = JS::throw_completion(JS::InternalError::create(realm(), error_string.release_value())); + result = vm.template throw_completion(error_string.release_value()); } else { auto executable = executable_result.release_value();