1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:27:42 +00:00

LibJS: Convert has_own_property() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-03 02:17:33 +01:00
parent f38a5957bf
commit 3be26f56db
9 changed files with 23 additions and 23 deletions

View file

@ -1680,10 +1680,7 @@ bool @class_name@::is_named_property_exposed_on_object(JS::PropertyName const& p
while (prototype) {
// FIXME: 1. If prototype is not a named properties object, and prototype has an own property named P, then return false.
// (It currently does not check for named property objects)
bool prototype_has_own_property_named_p = prototype->has_own_property(property_name);
if (vm.exception())
return {};
bool prototype_has_own_property_named_p = TRY_OR_DISCARD(prototype->has_own_property(property_name));
if (prototype_has_own_property_named_p)
return false;