1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 18:08:12 +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

@ -1331,9 +1331,7 @@ int main(int argc, char** argv)
auto maybe_variable = vm->resolve_binding(variable_name, &global_environment);
if (vm->exception())
break;
maybe_value = maybe_variable.get_value(interpreter->global_object());
if (vm->exception())
break;
maybe_value = TRY_OR_DISCARD(maybe_variable.get_value(interpreter->global_object()));
VERIFY(!maybe_value->is_empty());
auto variable = *maybe_value;