mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibJS: Remove leftover exception check in OrdinaryHasProperty
This commit is contained in:
parent
100e25d1d3
commit
ba55d77665
1 changed files with 1 additions and 6 deletions
|
@ -696,8 +696,6 @@ ThrowCompletionOr<bool> Object::internal_define_own_property(PropertyKey const&
|
|||
// 10.1.7 [[HasProperty]] ( P ), https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-hasproperty-p
|
||||
ThrowCompletionOr<bool> Object::internal_has_property(PropertyKey const& property_name) const
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
// 1. Assert: IsPropertyKey(P) is true.
|
||||
VERIFY(property_name.is_valid());
|
||||
|
||||
|
@ -714,10 +712,7 @@ ThrowCompletionOr<bool> Object::internal_has_property(PropertyKey const& propert
|
|||
// 5. If parent is not null, then
|
||||
if (parent) {
|
||||
// a. Return ? parent.[[HasProperty]](P).
|
||||
auto result = parent->internal_has_property(property_name);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
return result;
|
||||
return parent->internal_has_property(property_name);
|
||||
}
|
||||
|
||||
// 6. Return false.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue