diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-05-16 15:56:53 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-05-16 15:56:53 -0700 |
commit | d3743ea4e62e870724be26d423c90204c8639463 (patch) | |
tree | f54ee0cd640a9480341844dac86a4178892c94e5 /xfa/fxfa/parser/xfa_parser_imp.h | |
parent | fa34e805fd03ba81bcfe1148cf96b24fe63b39a0 (diff) | |
download | pdfium-d3743ea4e62e870724be26d423c90204c8639463.tar.xz |
Revert "Replace Release() { delete this; } in fde_xml_imp.h"
This reverts commit fa34e805fd03ba81bcfe1148cf96b24fe63b39a0.
Reason for revert: broke asan tests.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1982843002 .
Diffstat (limited to 'xfa/fxfa/parser/xfa_parser_imp.h')
-rw-r--r-- | xfa/fxfa/parser/xfa_parser_imp.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/xfa_parser_imp.h b/xfa/fxfa/parser/xfa_parser_imp.h index eb98966398..2485ddfcd2 100644 --- a/xfa/fxfa/parser/xfa_parser_imp.h +++ b/xfa/fxfa/parser/xfa_parser_imp.h @@ -7,18 +7,18 @@ #ifndef XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ #define XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ -#include <memory> - #include "xfa/fde/xml/fde_xml_imp.h" #include "xfa/fxfa/parser/xfa_parser.h" class CXFA_XMLParser; -class CXFA_SimpleParser final : public IXFA_Parser { +class CXFA_SimpleParser : public IXFA_Parser { public: CXFA_SimpleParser(CXFA_Document* pFactory, FX_BOOL bDocumentParser = FALSE); ~CXFA_SimpleParser() override; + void Release() override { delete this; } + int32_t StartParse(IFX_FileRead* pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; int32_t DoParse(IFX_Pause* pPause = NULL) override; @@ -82,11 +82,12 @@ class CXFA_SimpleParser final : public IXFA_Parser { friend class CXFA_DocumentParser; }; -class CXFA_DocumentParser final : public IXFA_Parser { +class CXFA_DocumentParser : public IXFA_Parser { public: CXFA_DocumentParser(CXFA_FFNotify* pNotify); ~CXFA_DocumentParser() override; + void Release() override { delete this; } int32_t StartParse(IFX_FileRead* pStream, XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; int32_t DoParse(IFX_Pause* pPause = NULL) override; @@ -110,12 +111,13 @@ class CXFA_DocumentParser final : public IXFA_Parser { }; typedef CFX_StackTemplate<CFDE_XMLNode*> CXFA_XMLNodeStack; -class CXFA_XMLParser : public IFDE_XMLParser { +class CXFA_XMLParser : public CFDE_XMLParser { public: CXFA_XMLParser(CFDE_XMLNode* pRoot, IFX_Stream* pStream); - ~CXFA_XMLParser() override; + ~CXFA_XMLParser(); - int32_t DoParser(IFX_Pause* pPause) override; + virtual void Release() { delete this; } + virtual int32_t DoParser(IFX_Pause* pPause); FX_FILESIZE m_nStart[2]; size_t m_nSize[2]; @@ -126,7 +128,7 @@ class CXFA_XMLParser : public IFDE_XMLParser { protected: CFDE_XMLNode* m_pRoot; IFX_Stream* m_pStream; - std::unique_ptr<CFDE_XMLSyntaxParser> m_pParser; + CFDE_XMLSyntaxParser* m_pParser; CFDE_XMLNode* m_pParent; CFDE_XMLNode* m_pChild; CXFA_XMLNodeStack m_NodeStack; |