mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-28 03:48:52 +00:00
Exact stack rooting for JSON related ScriptInterface functions.
Refs #2415 Refs #2462 This was SVN commit r15603.
This commit is contained in:
@@ -298,11 +298,15 @@ void SaveGamePrefix(ScriptInterface::CxPrivate* pCxPrivate, std::wstring prefix,
|
||||
LOGERROR(L"Failed to save game");
|
||||
}
|
||||
|
||||
void SetNetworkGameAttributes(ScriptInterface::CxPrivate* pCxPrivate, CScriptVal attribs)
|
||||
void SetNetworkGameAttributes(ScriptInterface::CxPrivate* pCxPrivate, CScriptVal attribs1)
|
||||
{
|
||||
ENSURE(g_NetServer);
|
||||
// TODO: Get Handle parameter directly with SpiderMonkey 31
|
||||
JSContext* cx = pCxPrivate->pScriptInterface->GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
JS::RootedValue attribs(cx, attribs1.get());
|
||||
|
||||
g_NetServer->UpdateGameAttributes(attribs, *(pCxPrivate->pScriptInterface));
|
||||
g_NetServer->UpdateGameAttributes(&attribs, *(pCxPrivate->pScriptInterface));
|
||||
}
|
||||
|
||||
void StartNetworkHost(ScriptInterface::CxPrivate* pCxPrivate, std::wstring playerName)
|
||||
|
||||
Reference in New Issue
Block a user