From ba55d77665e402ae0542a09e18dcb66a2d0e5969 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 9 Nov 2021 16:35:35 +0200 Subject: [PATCH] LibJS: Remove leftover exception check in OrdinaryHasProperty --- Userland/Libraries/LibJS/Runtime/Object.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Object.cpp b/Userland/Libraries/LibJS/Runtime/Object.cpp index 45af10a7e6..3975b0a05d 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.cpp +++ b/Userland/Libraries/LibJS/Runtime/Object.cpp @@ -696,8 +696,6 @@ ThrowCompletionOr 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 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 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.