mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
github-actions[bot]
2025-04-05 18:56:14 +00:00
Author: https://github.com/devgianlu Commit: https://github.com/LadybirdBrowser/ladybird/commit/6fc9de7aabc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4241
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user