1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +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

@ -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 {};
}));