mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibJS: Convert internal_get_own_property() to ThrowCompletionOr
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user