mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 03:25:48 +00:00
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:
@@ -158,8 +158,8 @@ template<> bool ScriptInterface::FromJSVal<CFixedVector3D>(const Request& rq, J
|
||||
|
||||
template<> void ScriptInterface::ToJSVal<CFixedVector3D>(const Request& rq, JS::MutableHandleValue ret, const CFixedVector3D& val)
|
||||
{
|
||||
ScriptInterface::CxPrivate* pCxPrivate = ScriptInterface::GetScriptInterfaceAndCBData(rq.cx);
|
||||
JS::RootedObject global(rq.cx, &pCxPrivate->pScriptInterface->GetGlobalObject().toObject());
|
||||
ScriptInterface::CmptPrivate* pCmptPrivate = ScriptInterface::GetScriptInterfaceAndCBData(rq.cx);
|
||||
JS::RootedObject global(rq.cx, &pCmptPrivate->pScriptInterface->GetGlobalObject().toObject());
|
||||
JS::RootedValue valueVector3D(rq.cx);
|
||||
if (!JS_GetProperty(rq.cx, global, "Vector3D", &valueVector3D))
|
||||
FAIL_VOID("Failed to get Vector3D constructor");
|
||||
@@ -192,8 +192,8 @@ template<> bool ScriptInterface::FromJSVal<CFixedVector2D>(const Request& rq, J
|
||||
|
||||
template<> void ScriptInterface::ToJSVal<CFixedVector2D>(const Request& rq, JS::MutableHandleValue ret, const CFixedVector2D& val)
|
||||
{
|
||||
ScriptInterface::CxPrivate* pCxPrivate = ScriptInterface::GetScriptInterfaceAndCBData(rq.cx);
|
||||
JS::RootedObject global(rq.cx, &pCxPrivate->pScriptInterface->GetGlobalObject().toObject());
|
||||
ScriptInterface::CmptPrivate* pCmptPrivate = ScriptInterface::GetScriptInterfaceAndCBData(rq.cx);
|
||||
JS::RootedObject global(rq.cx, &pCmptPrivate->pScriptInterface->GetGlobalObject().toObject());
|
||||
JS::RootedValue valueVector2D(rq.cx);
|
||||
if (!JS_GetProperty(rq.cx, global, "Vector2D", &valueVector2D))
|
||||
FAIL_VOID("Failed to get Vector2D constructor");
|
||||
|
||||
Reference in New Issue
Block a user