1
Fork 0
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:
Idan Horowitz 2021-11-02 18:49:08 +02:00 committed by Linus Groh
parent d73b258874
commit 390a04a985
6 changed files with 33 additions and 49 deletions

View file

@ -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