diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-21 22:56:37 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-21 22:56:37 +0000 |
commit | 1a3e186e975aa8eb6a6e42f2626b6f8ca980db19 (patch) | |
tree | cd9817ce3e5730a2b3efb36ccca253d5ecddac48 /fxjs/xfa | |
parent | f47444256898ed42e01accffa9c97a4dd82c9013 (diff) | |
download | pdfium-1a3e186e975aa8eb6a6e42f2626b6f8ca980db19.tar.xz |
Use UnownedPtr<> in xfa_resolvenode_rs.h
Change-Id: I4420fbf7402a8b08e33ca525e98690643d59efdf
Reviewed-on: https://pdfium-review.googlesource.com/40930
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/xfa')
-rw-r--r-- | fxjs/xfa/cjx_node.cpp | 1 | ||||
-rw-r--r-- | fxjs/xfa/cjx_tree.cpp | 8 |
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(); |