From 83bf2eb22e99e0d962e6174173526f00b38d51bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lancelot=20de=20Ferri=C3=A8re?= Date: Thu, 8 May 2025 14:50:10 +0200 Subject: [PATCH] Skip redundant HasProperty in GetObjectClassName --- source/scriptinterface/Object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/scriptinterface/Object.h b/source/scriptinterface/Object.h index 17e7f04205..48de95d939 100644 --- a/source/scriptinterface/Object.h +++ b/source/scriptinterface/Object.h @@ -135,7 +135,7 @@ template inline bool GetObjectClassName(const ScriptRequest& rq, JS::HandleObject obj, T& name) { JS::RootedValue constructor(rq.cx, JS::ObjectOrNullValue(JS_GetConstructor(rq.cx, obj))); - return constructor.isObject() && Script::HasProperty(rq, constructor, "name") && Script::GetProperty(rq, constructor, "name", name); + return constructor.isObject() && Script::GetProperty(rq, constructor, "name", name); } /**