mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibJS: Convert has_property() to ThrowCompletionOr
This commit is contained in:
parent
a29b7a3ec7
commit
f38a5957bf
11 changed files with 53 additions and 135 deletions
|
@ -242,7 +242,7 @@ ThrowCompletionOr<bool> Object::delete_property_or_throw(PropertyName const& pro
|
|||
}
|
||||
|
||||
// 7.3.11 HasProperty ( O, P ), https://tc39.es/ecma262/#sec-hasproperty
|
||||
bool Object::has_property(PropertyName const& property_name) const
|
||||
ThrowCompletionOr<bool> Object::has_property(PropertyName const& property_name) const
|
||||
{
|
||||
// 1. Assert: Type(O) is Object.
|
||||
|
||||
|
@ -250,7 +250,7 @@ bool Object::has_property(PropertyName const& property_name) const
|
|||
VERIFY(property_name.is_valid());
|
||||
|
||||
// 3. Return ? O.[[HasProperty]](P).
|
||||
return TRY_OR_DISCARD(internal_has_property(property_name));
|
||||
return internal_has_property(property_name);
|
||||
}
|
||||
|
||||
// 7.3.12 HasOwnProperty ( O, P ), https://tc39.es/ecma262/#sec-hasownproperty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue