summaryrefslogtreecommitdiff
path: root/fxjs/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/xfa')
-rw-r--r--fxjs/xfa/cjx_node.cpp1
-rw-r--r--fxjs/xfa/cjx_tree.cpp8
2 files changed, 5 insertions, 4 deletions
diff --git a/fxjs/xfa/cjx_node.cpp b/fxjs/xfa/cjx_node.cpp
index fed94094a7..8876628c3b 100644
--- a/fxjs/xfa/cjx_node.cpp
+++ b/fxjs/xfa/cjx_node.cpp
@@ -13,6 +13,7 @@
#include "core/fxcrt/cfx_memorystream.h"
#include "core/fxcrt/fx_codepage.h"
#include "fxjs/cfxjse_engine.h"
+#include "fxjs/cfxjse_value.h"
#include "fxjs/js_resources.h"
#include "third_party/base/ptr_util.h"
#include "xfa/fxfa/cxfa_eventparam.h"
diff --git a/fxjs/xfa/cjx_tree.cpp b/fxjs/xfa/cjx_tree.cpp
index 9787b9b885..23f76583ed 100644
--- a/fxjs/xfa/cjx_tree.cpp
+++ b/fxjs/xfa/cjx_tree.cpp
@@ -55,7 +55,7 @@ CJS_Result CJX_Tree::resolveNode(
}
if (resolveNodeRS.dwFlags == XFA_ResolveNode_RSType_Nodes) {
- CXFA_Object* pObject = resolveNodeRS.objects.front();
+ CXFA_Object* pObject = resolveNodeRS.objects.front().Get();
CFXJSE_Value* value =
GetDocument()->GetScriptContext()->GetJSValueFromMap(pObject);
if (!value)
@@ -66,7 +66,7 @@ CJS_Result CJX_Tree::resolveNode(
}
const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo =
- resolveNodeRS.pScriptAttribute;
+ resolveNodeRS.pScriptAttribute.Get();
if (!lpAttributeInfo ||
lpAttributeInfo->eValueType != XFA_ScriptType::Object) {
return CJS_Result::Success(runtime->NewNull());
@@ -231,14 +231,14 @@ void CJX_Tree::ResolveNodeList(CFXJSE_Value* pValue,
&resolveNodeRS, dwFlag, nullptr);
CXFA_ArrayNodeList* pNodeList = new CXFA_ArrayNodeList(GetDocument());
if (resolveNodeRS.dwFlags == XFA_ResolveNode_RSType_Nodes) {
- for (CXFA_Object* pObject : resolveNodeRS.objects) {
+ for (auto& pObject : resolveNodeRS.objects) {
if (pObject->IsNode())
pNodeList->Append(pObject->AsNode());
}
} else {
if (resolveNodeRS.pScriptAttribute &&
resolveNodeRS.pScriptAttribute->eValueType == XFA_ScriptType::Object) {
- for (CXFA_Object* pObject : resolveNodeRS.objects) {
+ for (auto& pObject : resolveNodeRS.objects) {
auto pValue =
pdfium::MakeUnique<CFXJSE_Value>(pScriptContext->GetIsolate());
CJX_Object* jsObject = pObject->JSObject();