1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09: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
Notes: sideshowbarker 2024-07-18 03:19:22 +09:00
19 changed files with 100 additions and 166 deletions

View file

@ -92,12 +92,12 @@ static Optional<PropertyDescriptor> string_get_own_property(GlobalObject& global
}
// 10.4.3.1 [[GetOwnProperty]] ( P ), https://tc39.es/ecma262/#sec-string-exotic-objects-getownproperty-p
Optional<PropertyDescriptor> StringObject::internal_get_own_property(PropertyName const& property_name) const
ThrowCompletionOr<Optional<PropertyDescriptor>> StringObject::internal_get_own_property(PropertyName const& property_name) const
{
// Assert: IsPropertyKey(P) is true.
// 2. Let desc be OrdinaryGetOwnProperty(S, P).
auto descriptor = Object::internal_get_own_property(property_name);
auto descriptor = Object::internal_get_own_property(property_name).release_value();
// 3. If desc is not undefined, return desc.
if (descriptor.has_value())