mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +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
|
@ -673,8 +673,7 @@ ThrowCompletionOr<MarkedValueList> ProxyObject::internal_own_property_keys() con
|
|||
auto& vm = global_object.vm();
|
||||
if (!value.is_string() && !value.is_symbol())
|
||||
return vm.throw_completion<TypeError>(global_object, ErrorType::ProxyOwnPropertyKeysNotStringOrSymbol);
|
||||
auto property_key = value.to_property_key(global_object);
|
||||
VERIFY(!vm.exception());
|
||||
auto property_key = MUST(value.to_property_key(global_object));
|
||||
unique_keys.set(property_key, AK::HashSetExistingEntryBehavior::Keep);
|
||||
return {};
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue