mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
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.
This commit is contained in:
parent
08cfd5ff1b
commit
7c8554fb95
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ ThrowCompletionOr<Value> Interpreter::run(Script& script_record, GC::Ptr<Environ
|
|||
else if (error_string = String::formatted("TODO({})", error_string.value()); error_string.is_error())
|
||||
result = vm.template throw_completion<JS::InternalError>(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<JS::InternalError>(error_string.release_value());
|
||||
} else {
|
||||
auto executable = executable_result.release_value();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue