mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:45:07 +00:00
LibJS: Convert the GetValue AO to ThrowCompletionOr
This commit is contained in:
parent
d73b258874
commit
390a04a985
6 changed files with 33 additions and 49 deletions
|
@ -261,7 +261,10 @@ void GetVariable::execute_impl(Bytecode::Interpreter& interpreter) const
|
|||
if (interpreter.vm().exception())
|
||||
return;
|
||||
|
||||
interpreter.accumulator() = reference.get_value(interpreter.global_object());
|
||||
auto value_or_error = reference.get_value(interpreter.global_object());
|
||||
if (value_or_error.is_error())
|
||||
return;
|
||||
interpreter.accumulator() = value_or_error.release_value();
|
||||
}
|
||||
|
||||
void SetVariable::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue