Replace CScriptValRooted with JS::Heap<T> and custom tracer for CNetClient

Refs #2462

This was SVN commit r15946.
This commit is contained in:
Yves
2014-11-09 15:16:00 +00:00
parent e1f354024a
commit 8b9847e007
3 changed files with 52 additions and 25 deletions
+2 -1
View File
@@ -395,7 +395,8 @@ CScriptVal PollNetworkClient(ScriptInterface::CxPrivate* pCxPrivate)
// Convert from net client context to GUI script context
JSContext* cxNet = g_NetClient->GetScriptInterface().GetContext();
JSAutoRequest rqNet(cxNet);
JS::RootedValue pollNet(cxNet, g_NetClient->GuiPoll().get());
JS::RootedValue pollNet(cxNet);
g_NetClient->GuiPoll(&pollNet);
return pCxPrivate->pScriptInterface->CloneValueFromOtherContext(g_NetClient->GetScriptInterface(), pollNet);
}