mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibJS: Convert internal_own_property_keys() to ThrowCompletionOr
This commit is contained in:
parent
fbfb0bb908
commit
ee8380edea
Notes:
sideshowbarker
2024-07-18 03:18:58 +09:00
Author: https://github.com/linusg
Commit: ee8380edea
Pull-request: https://github.com/SerenityOS/serenity/pull/10266
Reviewed-by: https://github.com/IdanHo ✅
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