diff options
author | tsepez <tsepez@chromium.org> | 2017-01-23 11:01:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-23 11:01:42 -0800 |
commit | c757d9a6f90bb879ce2cdd4a756b7b0e1885eb25 (patch) | |
tree | 34847e86907f80d508598eadbb13b463395b49fe /xfa/fxfa/parser/cxfa_node.cpp | |
parent | 82aa396188ec26f22fe730f4e35b5a54ebffb5dc (diff) | |
download | pdfium-c757d9a6f90bb879ce2cdd4a756b7b0e1885eb25.tar.xz |
Remove some |void Release() { delete this; }| anti-pattern.
m_pSyntaxParser was unused.
Review-Url: https://codereview.chromium.org/2646203002
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index bc2a10c08b..5411443e6a 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -511,7 +511,7 @@ CXFA_Node::~CXFA_Node() { pNode = pNext; } if (m_pXMLNode && IsOwnXMLNode()) - m_pXMLNode->Release(); + delete m_pXMLNode; } CXFA_Node* CXFA_Node::Clone(bool bRecursive) { @@ -1406,10 +1406,8 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) { } pFakeRoot->SetFlag(XFA_NodeFlag_HasRemovedChildren, false); } else { - if (pFakeXMLRoot) { - pFakeXMLRoot->Release(); - pFakeXMLRoot = nullptr; - } + delete pFakeXMLRoot; + pFakeXMLRoot = nullptr; } } |