mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibJS: Convert internal_get_own_property() to ThrowCompletionOr
This commit is contained in:
parent
73bae7d779
commit
0e69a6e487
19 changed files with 100 additions and 166 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue