summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-09-29 18:58:03 +0100
committerLinus Groh <mail@linusgroh.de>2021-09-29 23:49:53 +0100
commitee8380edeabf822cf194eacaf081b801deea6c3a (patch)
treec9279b619cceb68ddcc02df32a2daef679762df7 /Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
parentfbfb0bb908fe74643ce4eddc72c2fb4cc7e6c68d (diff)
downloadserenity-ee8380edeabf822cf194eacaf081b801deea6c3a.zip
LibJS: Convert internal_own_property_keys() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ReflectObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ReflectObject.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
index dc5dd1812d..8014263fb9 100644
--- a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
@@ -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);