1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:08:13 +00:00

LibJS: Convert has_property() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-03 02:00:39 +01:00
parent a29b7a3ec7
commit f38a5957bf
11 changed files with 53 additions and 135 deletions

View file

@ -1283,7 +1283,7 @@ Value in(GlobalObject& global_object, Value lhs, Value rhs)
auto lhs_property_key = lhs.to_property_key(global_object);
if (global_object.vm().exception())
return {};
return Value(rhs.as_object().has_property(lhs_property_key));
return Value(TRY_OR_DISCARD(rhs.as_object().has_property(lhs_property_key)));
}
// 13.10.2 InstanceofOperator ( V, target ), https://tc39.es/ecma262/#sec-instanceofoperator