From 6556be05e041e97b29eae8166c60eb83af7f5bd2 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 6 Feb 2018 18:31:48 +0000 Subject: Make the CXFA_Node parent pointer Unowned This CL converts the CXFA_Node parent pointer to be an Unowned pointer instead of a raw pointer. Bug: chromium:807863 Change-Id: I266c9216cfe8153e234bf66b88fbac6c8d96ebb4 Reviewed-on: https://pdfium-review.googlesource.com/25650 Reviewed-by: Ryan Harrison Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_node.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_node.h') diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h index 22b5192264..27bdab0195 100644 --- a/xfa/fxfa/parser/cxfa_node.h +++ b/xfa/fxfa/parser/cxfa_node.h @@ -181,7 +181,7 @@ class CXFA_Node : public CXFA_Object { CXFA_Node* GetNextSibling() const { return m_pNext; } CXFA_Node* GetPrevSibling() const; CXFA_Node* GetFirstChild() const { return m_pChild; } - CXFA_Node* GetParent() const { return m_pParent; } + CXFA_Node* GetParent() const { return parent_.Get(); } CXFA_Node* GetNextContainerSibling() const; CXFA_Node* GetPrevContainerSibling() const; @@ -495,7 +495,7 @@ class CXFA_Node : public CXFA_Object { CXFA_Node* m_pNext; CXFA_Node* m_pChild; CXFA_Node* m_pLastChild; - CXFA_Node* m_pParent; + UnownedPtr parent_; CFX_XMLNode* m_pXMLNode; const XFA_PacketType m_ePacket; uint8_t m_ExecuteRecursionDepth = 0; -- cgit v1.2.3