mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Removes g_ScriptingHost and implements global to compartment 1 to 1 relation.
Each GUI Page gets its own compartment and all ScriptInterfaces in the same thread should now use the same JS Runtime. This is required for the SpiderMonkey upgrade. Check the ticket for details. Closes #2241 Refs #1886 Refs #1966 This was SVN commit r14496.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
|
||||
#define IMPLEMENT_BOOLEAN_SCRIPT_SETTING(NAME) \
|
||||
bool JSI_GameView::Get##NAME##Enabled(void* UNUSED(cbdata)) \
|
||||
bool JSI_GameView::Get##NAME##Enabled(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)) \
|
||||
{ \
|
||||
if (!g_Game || !g_Game->GetView()) \
|
||||
{ \
|
||||
@@ -34,7 +34,7 @@ bool JSI_GameView::Get##NAME##Enabled(void* UNUSED(cbdata)) \
|
||||
return g_Game->GetView()->Get##NAME##Enabled(); \
|
||||
} \
|
||||
\
|
||||
void JSI_GameView::Set##NAME##Enabled(void* UNUSED(cbdata), bool Enabled) \
|
||||
void JSI_GameView::Set##NAME##Enabled(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool Enabled) \
|
||||
{ \
|
||||
if (!g_Game || !g_Game->GetView()) \
|
||||
{ \
|
||||
|
||||
Reference in New Issue
Block a user