forked from mirrors/0ad
Mass rename CxPrivate to CmptPrivate.
As part of the SM45->52 migration, a ScriptInterface becomes a wrapper around a JSCompartment, not a JSContext, thus we ought to store private data for the compartment and not the context. This is a mass rename of CxPrivate to CmptPrivate to match that before the actual changes. Part of the SM52 migration, stage: SM45 compatible Patch by: Itms Tested By: Freagarach Refs #4893 Differential Revision: https://code.wildfiregames.com/D3089 This was SVN commit r24177.
This commit is contained in:
@@ -430,8 +430,8 @@ ScriptInterface::ScriptInterface(const char* nativeScopeName, const char* debugN
|
||||
}
|
||||
|
||||
Request rq(this);
|
||||
m_CxPrivate.pScriptInterface = this;
|
||||
JS_SetContextPrivate(rq.cx, (void*)&m_CxPrivate);
|
||||
m_CmptPrivate.pScriptInterface = this;
|
||||
JS_SetContextPrivate(rq.cx, (void*)&m_CmptPrivate);
|
||||
}
|
||||
|
||||
ScriptInterface::~ScriptInterface()
|
||||
@@ -445,13 +445,13 @@ ScriptInterface::~ScriptInterface()
|
||||
|
||||
void ScriptInterface::SetCallbackData(void* pCBData)
|
||||
{
|
||||
m_CxPrivate.pCBData = pCBData;
|
||||
m_CmptPrivate.pCBData = pCBData;
|
||||
}
|
||||
|
||||
ScriptInterface::CxPrivate* ScriptInterface::GetScriptInterfaceAndCBData(JSContext* cx)
|
||||
ScriptInterface::CmptPrivate* ScriptInterface::GetScriptInterfaceAndCBData(JSContext* cx)
|
||||
{
|
||||
CxPrivate* pCxPrivate = (CxPrivate*)JS_GetContextPrivate(cx);
|
||||
return pCxPrivate;
|
||||
CmptPrivate* pCmptPrivate = (CmptPrivate*)JS_GetContextPrivate(cx);
|
||||
return pCmptPrivate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user