diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-12 19:03:31 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-12 19:03:31 +0000 |
commit | b164ac5ffb4e4142b072600ee0b4333b7ed595c6 (patch) | |
tree | 20f689bfe750e9659ad178ec4927e052358c8621 /xfa/fxfa/parser/cxfa_node.h | |
parent | e4bb31aaad789cca85d6083147e519dda55449ad (diff) | |
download | pdfium-b164ac5ffb4e4142b072600ee0b4333b7ed595c6.tar.xz |
Cleanup CXFA_Node tree pointerschromium/3346
This CL changes the CXFA_Node parent pointer back to a raw pointer from
an UnownedPtr. The other tree pointers have been renamed for clarity.
Change-Id: I366a0b5b41d49d87b11bec0eea9890fbc79c1c62
Reviewed-on: https://pdfium-review.googlesource.com/26370
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h index c3b2fd1b84..09db729130 100644 --- a/xfa/fxfa/parser/cxfa_node.h +++ b/xfa/fxfa/parser/cxfa_node.h @@ -178,10 +178,10 @@ class CXFA_Node : public CXFA_Object { CXFA_Node* Clone(bool bRecursive); - CXFA_Node* GetNextSibling() const { return m_pNext; } + CXFA_Node* GetNextSibling() const { return next_sibling_; } CXFA_Node* GetPrevSibling() const; - CXFA_Node* GetFirstChild() const { return m_pChild; } - CXFA_Node* GetParent() const { return parent_.Get(); } + CXFA_Node* GetFirstChild() const { return first_child_; } + CXFA_Node* GetParent() const { return parent_; } CXFA_Node* GetNextContainerSibling() const; CXFA_Node* GetPrevContainerSibling() const; @@ -492,10 +492,15 @@ class CXFA_Node : public CXFA_Object { const PropertyData* const m_Properties; const AttributeData* const m_Attributes; const uint32_t m_ValidPackets; - CXFA_Node* m_pNext; - CXFA_Node* m_pChild; - CXFA_Node* m_pLastChild; - UnownedPtr<CXFA_Node> parent_; + + // These nodes are responsible for building the CXFA_Node tree. We don't use + // unowned ptrs here because the cleanup process will remove the nodes in an + // order that doesn't necessarily match up to the tree structure. + CXFA_Node* parent_; + CXFA_Node* next_sibling_; + CXFA_Node* first_child_; + CXFA_Node* last_child_; + CFX_XMLNode* m_pXMLNode; const XFA_PacketType m_ePacket; uint8_t m_ExecuteRecursionDepth = 0; |