diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-29 17:53:57 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-29 23:49:53 +0100 |
commit | 0e69a6e487a3d00b329e01bd21b5acfce9070765 (patch) | |
tree | 27ef06bb0517cd2ffd1c34f6721fe593d2791899 /Userland/Libraries/LibJS/Runtime/ReflectObject.cpp | |
parent | 73bae7d779ebbf14eec603d8619f4d5247a6e69a (diff) | |
download | serenity-0e69a6e487a3d00b329e01bd21b5acfce9070765.zip |
LibJS: Convert internal_get_own_property() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ReflectObject.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ReflectObject.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp index ac2d057d17..bec3c3c746 100644 --- a/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ReflectObject.cpp @@ -192,9 +192,7 @@ JS_DEFINE_NATIVE_FUNCTION(ReflectObject::get_own_property_descriptor) return {}; // 3. Let desc be ? target.[[GetOwnProperty]](key). - auto descriptor = target.as_object().internal_get_own_property(key); - if (vm.exception()) - return {}; + auto descriptor = TRY_OR_DISCARD(target.as_object().internal_get_own_property(key)); // 4. Return FromPropertyDescriptor(desc). return from_property_descriptor(global_object, descriptor); |