summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-21 22:56:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-21 22:56:37 +0000
commit1a3e186e975aa8eb6a6e42f2626b6f8ca980db19 (patch)
treecd9817ce3e5730a2b3efb36ccca253d5ecddac48 /xfa/fxfa/parser/cxfa_document.cpp
parentf47444256898ed42e01accffa9c97a4dd82c9013 (diff)
downloadpdfium-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 'xfa/fxfa/parser/cxfa_document.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index d42bfb5601..72bba2aeb0 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -360,7 +360,8 @@ CXFA_Node* FindDataRefDataNode(CXFA_Document* pDocument,
}
if (rs.dwFlags == XFA_ResolveNode_RSType_CreateNodeOne) {
- CXFA_Object* pObject = !rs.objects.empty() ? rs.objects.front() : nullptr;
+ CXFA_Object* pObject =
+ !rs.objects.empty() ? rs.objects.front().Get() : nullptr;
CXFA_Node* pNode = ToNode(pObject);
return (bForceBind || !pNode || !pNode->HasBindItem()) ? pNode : nullptr;
}
@@ -1200,7 +1201,7 @@ void UpdateBindingRelations(CXFA_Document* pDocument,
pDocument->GetScriptContext()->ResolveObjects(
pDataScope, wsRef.AsStringView(), &rs, dFlags, pTemplateNode);
CXFA_Object* pObject =
- !rs.objects.empty() ? rs.objects.front() : nullptr;
+ !rs.objects.empty() ? rs.objects.front().Get() : nullptr;
pDataNode = ToNode(pObject);
if (pDataNode) {
CreateDataBinding(pFormNode, pDataNode,
@@ -1618,8 +1619,8 @@ void CXFA_Document::DataMerge_UpdateBindingRelations(
}
CXFA_Node* CXFA_Document::GetNotBindNode(
- const std::vector<CXFA_Object*>& arrayObjects) const {
- for (CXFA_Object* pObject : arrayObjects) {
+ const std::vector<UnownedPtr<CXFA_Object>>& arrayObjects) const {
+ for (auto& pObject : arrayObjects) {
CXFA_Node* pNode = pObject->AsNode();
if (pNode && !pNode->HasBindItem())
return pNode;