mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 00:43:45 +00:00
Skip redundant HasProperty in GetObjectClassName
(cherry picked from commit 83bf2eb22e)
Signed-off-by: Itms <itms@wildfiregames.com>
This commit is contained in:
committed by
Itms
parent
3fce9a37cc
commit
0fdd6005b8
@@ -135,7 +135,7 @@ template<typename T>
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user