summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fxjs/cfxjse_engine.cpp19
-rw-r--r--fxjs/cfxjse_engine.h2
-rw-r--r--fxjs/cfxjse_formcalc_context.cpp8
-rw-r--r--fxjs/xfa/cjx_tree.cpp2
4 files changed, 15 insertions, 16 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index 62376dd822..dd907271eb 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -83,9 +83,8 @@ CXFA_Object* CFXJSE_Engine::ToObject(
}
// static.
-CXFA_Object* CFXJSE_Engine::ToObject(CFXJSE_Value* pValue,
- CFXJSE_Class* pClass) {
- CFXJSE_HostObject* pHostObj = pValue->ToHostObject(pClass);
+CXFA_Object* CFXJSE_Engine::ToObject(CFXJSE_Value* pValue) {
+ CFXJSE_HostObject* pHostObj = pValue->ToHostObject(nullptr);
return pHostObj ? pHostObj->AsCXFAObject() : nullptr;
}
@@ -175,7 +174,7 @@ bool CFXJSE_Engine::QueryNodeByFlag(CXFA_Node* refNode,
void CFXJSE_Engine::GlobalPropertySetter(CFXJSE_Value* pObject,
const ByteStringView& szPropName,
CFXJSE_Value* pValue) {
- CXFA_Object* lpOrginalNode = ToObject(pObject, nullptr);
+ CXFA_Object* lpOrginalNode = ToObject(pObject);
CXFA_Document* pDoc = lpOrginalNode->GetDocument();
CFXJSE_Engine* lpScriptContext = pDoc->GetScriptContext();
CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject());
@@ -209,7 +208,7 @@ void CFXJSE_Engine::GlobalPropertySetter(CFXJSE_Value* pObject,
void CFXJSE_Engine::GlobalPropertyGetter(CFXJSE_Value* pObject,
const ByteStringView& szPropName,
CFXJSE_Value* pValue) {
- CXFA_Object* pOriginalObject = ToObject(pObject, nullptr);
+ CXFA_Object* pOriginalObject = ToObject(pObject);
CXFA_Document* pDoc = pOriginalObject->GetDocument();
CFXJSE_Engine* lpScriptContext = pDoc->GetScriptContext();
WideString wsPropName = WideString::FromUTF8(szPropName);
@@ -268,7 +267,7 @@ void CFXJSE_Engine::GlobalPropertyGetter(CFXJSE_Value* pObject,
int32_t CFXJSE_Engine::GlobalPropTypeGetter(CFXJSE_Value* pOriginalValue,
const ByteStringView& szPropName,
bool bQueryIn) {
- CXFA_Object* pObject = ToObject(pOriginalValue, nullptr);
+ CXFA_Object* pObject = ToObject(pOriginalValue);
if (!pObject)
return FXJSE_ClassPropType_None;
@@ -284,7 +283,7 @@ int32_t CFXJSE_Engine::GlobalPropTypeGetter(CFXJSE_Value* pOriginalValue,
void CFXJSE_Engine::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
const ByteStringView& szPropName,
CFXJSE_Value* pReturnValue) {
- CXFA_Object* pOriginalObject = ToObject(pOriginalValue, nullptr);
+ CXFA_Object* pOriginalObject = ToObject(pOriginalValue);
if (!pOriginalObject) {
pReturnValue->SetUndefined();
return;
@@ -358,7 +357,7 @@ void CFXJSE_Engine::NormalPropertyGetter(CFXJSE_Value* pOriginalValue,
void CFXJSE_Engine::NormalPropertySetter(CFXJSE_Value* pOriginalValue,
const ByteStringView& szPropName,
CFXJSE_Value* pReturnValue) {
- CXFA_Object* pOriginalObject = ToObject(pOriginalValue, nullptr);
+ CXFA_Object* pOriginalObject = ToObject(pOriginalValue);
if (!pOriginalObject)
return;
@@ -411,7 +410,7 @@ void CFXJSE_Engine::NormalPropertySetter(CFXJSE_Value* pOriginalValue,
int32_t CFXJSE_Engine::NormalPropTypeGetter(CFXJSE_Value* pOriginalValue,
const ByteStringView& szPropName,
bool bQueryIn) {
- CXFA_Object* pObject = ToObject(pOriginalValue, nullptr);
+ CXFA_Object* pObject = ToObject(pOriginalValue);
if (!pObject)
return FXJSE_ClassPropType_None;
@@ -663,7 +662,7 @@ bool CFXJSE_Engine::ResolveObjects(CXFA_Object* refObject,
CJX_Object* jsObject = rndFind.m_Objects.front()->JSObject();
(jsObject->*(rndFind.m_pScriptAttribute->callback))(
pValue.get(), false, rndFind.m_pScriptAttribute->attribute);
- rndFind.m_Objects.front() = ToObject(pValue.get(), nullptr);
+ rndFind.m_Objects.front() = ToObject(pValue.get());
}
if (!m_upObjectArray.empty())
m_upObjectArray.pop_back();
diff --git a/fxjs/cfxjse_engine.h b/fxjs/cfxjse_engine.h
index 0ae16df84e..b85a4f1ae2 100644
--- a/fxjs/cfxjse_engine.h
+++ b/fxjs/cfxjse_engine.h
@@ -29,7 +29,7 @@ class CXFA_List;
class CFXJSE_Engine : public CFX_V8 {
public:
static CXFA_Object* ToObject(const v8::FunctionCallbackInfo<v8::Value>& info);
- static CXFA_Object* ToObject(CFXJSE_Value* pValue, CFXJSE_Class* pClass);
+ static CXFA_Object* ToObject(CFXJSE_Value* pValue);
static void GlobalPropertyGetter(CFXJSE_Value* pObject,
const ByteStringView& szPropName,
CFXJSE_Value* pValue);
diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp
index b0a26d86a4..6ca57bb649 100644
--- a/fxjs/cfxjse_formcalc_context.cpp
+++ b/fxjs/cfxjse_formcalc_context.cpp
@@ -5837,7 +5837,7 @@ void CFXJSE_FormCalcContext::unfoldArgs(
void CFXJSE_FormCalcContext::GetObjectDefaultValue(
CFXJSE_Value* pValue,
CFXJSE_Value* pDefaultValue) {
- CXFA_Node* pNode = ToNode(CFXJSE_Engine::ToObject(pValue, nullptr));
+ CXFA_Node* pNode = ToNode(CFXJSE_Engine::ToObject(pValue));
if (!pNode) {
pDefaultValue->SetNull();
return;
@@ -5849,7 +5849,7 @@ void CFXJSE_FormCalcContext::GetObjectDefaultValue(
// static
bool CFXJSE_FormCalcContext::SetObjectDefaultValue(CFXJSE_Value* pValue,
CFXJSE_Value* hNewValue) {
- CXFA_Node* pNode = ToNode(CFXJSE_Engine::ToObject(pValue, nullptr));
+ CXFA_Node* pNode = ToNode(CFXJSE_Engine::ToObject(pValue));
if (!pNode)
return false;
@@ -5934,7 +5934,7 @@ bool CFXJSE_FormCalcContext::ResolveObjects(CFXJSE_Value* pThis,
pNode = pScriptContext->GetThisObject();
dFlags = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent;
} else {
- pNode = CFXJSE_Engine::ToObject(pRefValue, nullptr);
+ pNode = CFXJSE_Engine::ToObject(pRefValue);
if (!pNode)
return false;
@@ -5959,7 +5959,7 @@ bool CFXJSE_FormCalcContext::ResolveObjects(CFXJSE_Value* pThis,
}
}
} else {
- pNode = CFXJSE_Engine::ToObject(pRefValue, nullptr);
+ pNode = CFXJSE_Engine::ToObject(pRefValue);
dFlags = XFA_RESOLVENODE_AnyChild;
}
return pScriptContext->ResolveObjects(pNode, wsSomExpression.AsStringView(),
diff --git a/fxjs/xfa/cjx_tree.cpp b/fxjs/xfa/cjx_tree.cpp
index 8971ef989b..3a266eb450 100644
--- a/fxjs/xfa/cjx_tree.cpp
+++ b/fxjs/xfa/cjx_tree.cpp
@@ -242,7 +242,7 @@ void CJX_Tree::ResolveNodeList(CFXJSE_Value* pValue,
(jsObject->*(resolveNodeRS.pScriptAttribute->callback))(
pValue.get(), false, resolveNodeRS.pScriptAttribute->attribute);
- CXFA_Object* obj = CFXJSE_Engine::ToObject(pValue.get(), nullptr);
+ CXFA_Object* obj = CFXJSE_Engine::ToObject(pValue.get());
if (obj->IsNode())
pNodeList->Append(obj->AsNode());
}