From 0fdd6005b816f9cf70db7fd3aecd4c30d757ccb5 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 (cherry picked from commit 83bf2eb22e99e0d962e6174173526f00b38d51bf) Signed-off-by: Itms --- 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 25ebadd219..75f6ce224e 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); } /**