summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_engine.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-23 19:39:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-23 19:39:24 +0000
commit9f53dc093a9d00342ea76ecc0b4c8c84357ffd6e (patch)
tree707da4542ab409dfbed36607a59fdab9f256ef44 /fxjs/cfxjse_engine.cpp
parent2dcf20fa8d3035f4366178654abbfbc95aa9e799 (diff)
downloadpdfium-9f53dc093a9d00342ea76ecc0b4c8c84357ffd6e.tar.xz
Remove second argument to CFXJSE_Engine::ToObject()
It, too, is always passed as nullptr. Change-Id: I2573bea4cc33f48c13979026ea8ae42b368ce8a5 Reviewed-on: https://pdfium-review.googlesource.com/38590 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r--fxjs/cfxjse_engine.cpp19
1 files changed, 9 insertions, 10 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();