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:
parent
1639ed7e0a
commit
c488f5a59d
9 changed files with 42 additions and 73 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue