mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Provide ScriptInterface CreateObject and CreateArray functions to replace Eval calls following 7c2e9027c2, 1c0536bf08 and later.
Differential Revision: https://code.wildfiregames.com/D2080 Previous version reviewed By: Krinkle Comments By: historic_bruno, wraitii This was SVN commit r22528.
This commit is contained in:
@@ -372,7 +372,8 @@ void CMapSummaryReader::GetMapSettings(const ScriptInterface& scriptInterface, J
|
||||
JSContext* cx = scriptInterface.GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
|
||||
scriptInterface.Eval("({})", ret);
|
||||
scriptInterface.CreateObject(ret);
|
||||
|
||||
if (m_ScriptSettings.empty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user