Shouldn't make last-minute changes without recompiling...

This was SVN commit r25435.
This commit is contained in:
wraitii
2021-05-14 11:12:07 +00:00
parent 4f972bc623
commit cf5c815879
+3 -3
View File
@@ -62,7 +62,7 @@ IGUIObject::IGUIObject(CGUI& pGUI)
IGUIObject::~IGUIObject()
{
if (!m_ScriptHandlers.empty())
JS_RemoveExtraGCRootsTracer(m_pGUI.GetScriptInterface().cx, Trace, this);
JS_RemoveExtraGCRootsTracer(ScriptRequest(m_pGUI.GetScriptInterface()).cx, Trace, this);
// m_Children is deleted along all other GUI Objects in the CGUI destructor
}
@@ -310,7 +310,7 @@ void IGUIObject::RegisterScriptHandler(const CStr& eventName, const CStr& Code,
void IGUIObject::SetScriptHandler(const CStr& eventName, JS::HandleObject Function)
{
if (m_ScriptHandlers.empty())
JS_AddExtraGCRootsTracer(m_pGUI.GetScriptInterface().cx, Trace, this);
JS_AddExtraGCRootsTracer(ScriptRequest(m_pGUI.GetScriptInterface()).cx, Trace, this);
m_ScriptHandlers[eventName] = JS::Heap<JSObject*>(Function);
@@ -328,7 +328,7 @@ void IGUIObject::UnsetScriptHandler(const CStr& eventName)
m_ScriptHandlers.erase(it);
if (m_ScriptHandlers.empty())
JS_RemoveExtraGCRootsTracer(m_pGUI.GetScriptInterface().cx, Trace, this);
JS_RemoveExtraGCRootsTracer(ScriptRequest(m_pGUI.GetScriptInterface()).cx, Trace, this);
std::unordered_map<CStr, std::vector<IGUIObject*>>::iterator it2 = m_pGUI.m_EventObjects.find(eventName);
if (it2 == m_pGUI.m_EventObjects.end())