1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibJS: Convert internal_get_own_property() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-29 17:53:57 +01:00
parent 73bae7d779
commit 0e69a6e487
19 changed files with 100 additions and 166 deletions

View file

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