1
0
forked from mirrors/0ad

More ScriptInterface const.

Reviewed By: elexis; some comments by bb
Differential Revision: https://code.wildfiregames.com/D863
This was SVN commit r20519.
This commit is contained in:
leper
2017-11-25 06:49:58 +00:00
parent 60801158b5
commit f7206dc77d
14 changed files with 27 additions and 35 deletions
+1 -6
View File
@@ -596,17 +596,12 @@ bool ScriptInterface::CallFunction_(JS::HandleValue val, const char* name, JS::H
return ok;
}
JS::Value ScriptInterface::GetGlobalObject()
JS::Value ScriptInterface::GetGlobalObject() const
{
JSAutoRequest rq(m->m_cx);
return JS::ObjectValue(*JS::CurrentGlobalOrNull(m->m_cx));
}
JSClass* ScriptInterface::GetGlobalClass()
{
return &global_class;
}
bool ScriptInterface::SetGlobal_(const char* name, JS::HandleValue value, bool replace)
{
JSAutoRequest rq(m->m_cx);