mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
LibJS: Convert internal_own_property_keys() to ThrowCompletionOr
This commit is contained in:
parent
fbfb0bb908
commit
ee8380edea
15 changed files with 56 additions and 92 deletions
|
@ -261,9 +261,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::own_keys)
|
|||
}
|
||||
|
||||
// 2. Let keys be ? target.[[OwnPropertyKeys]]().
|
||||
auto keys = target.as_object().internal_own_property_keys();
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto keys = TRY_OR_DISCARD(target.as_object().internal_own_property_keys());
|
||||
|
||||
// 3. Return CreateArrayFromList(keys).
|
||||
return Array::create_from(global_object, keys);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue