mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-25 12:09:33 +00:00
Exact stack rooting for ScriptInterface::ToString.
I had to change a few other functions to take JS::MutableHandleValue because JS::Stringify takes a JS::MutableHandleValue as input parameter. That seems a bit strange because it should not change that value. I assume it has historical reasons. Refs #2415 Refs #2462 This was SVN commit r15605.
This commit is contained in:
@@ -93,11 +93,11 @@ void CComponentTypeScript::Serialize(ISerializer& serialize)
|
||||
JS::RootedValue val(cx);
|
||||
if (!m_ScriptInterface.CallFunction(tmpInstance, "Serialize", &val))
|
||||
LOGERROR(L"Script Serialize call failed");
|
||||
serialize.ScriptVal("object", val);
|
||||
serialize.ScriptVal("object", &val);
|
||||
}
|
||||
else
|
||||
{
|
||||
serialize.ScriptVal("object", tmpInstance);
|
||||
serialize.ScriptVal("object", &tmpInstance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user