1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

LibJS: Convert to_property_key() to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-10-16 22:20:23 +03:00 committed by Linus Groh
parent 1639ed7e0a
commit c488f5a59d
9 changed files with 42 additions and 73 deletions

View file

@ -263,7 +263,10 @@ ThrowCompletionOr<void> VM::property_binding_initialization(BindingPattern const
auto result = expression->execute(interpreter(), global_object);
if (exception())
return;
name = result.to_property_key(global_object);
auto name_or_error = result.to_property_key(global_object);
if (name_or_error.is_error())
return;
name = name_or_error.release_value();
});
if (auto* thrown_exception = exception())