mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +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
27c19c02d2
commit
6fc9de7aab
Notes:
github-actions[bot]
2025-04-05 18:56:14 +00:00
Author: https://github.com/devgianlu
Commit: 6fc9de7aab
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4241
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
Add a link
Reference in a new issue