Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2006)

Unified Diff: xfa/fxfa/parser/cxfa_document_parser.cpp

Issue 2131653002: Cleanup ownership of parser members (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@parser_split
Patch Set: Rebase to master Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/cxfa_document_parser.h ('k') | xfa/fxfa/parser/cxfa_simple_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/cxfa_document_parser.cpp
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index 565916ba9371e56e66030511b1ef96f46f3c5b01..ff54fb3d87bdc82c6886ae06e341f1d6314f0af0 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -13,12 +13,13 @@ CXFA_DocumentParser::CXFA_DocumentParser(CXFA_FFNotify* pNotify)
: m_nodeParser(nullptr, TRUE), m_pNotify(pNotify) {}
CXFA_DocumentParser::~CXFA_DocumentParser() {
- CloseParser();
}
int32_t CXFA_DocumentParser::StartParse(IFX_FileRead* pStream,
XFA_XDPPACKET ePacketID) {
- CloseParser();
+ m_pDocument.reset();
+ m_nodeParser.CloseParser();
+
int32_t nRetStatus = m_nodeParser.StartParse(pStream, ePacketID);
if (nRetStatus == XFA_PARSESTATUS_Ready) {
m_pDocument.reset(new CXFA_Document(this));
@@ -47,8 +48,3 @@ CXFA_FFNotify* CXFA_DocumentParser::GetNotify() const {
CXFA_Document* CXFA_DocumentParser::GetDocument() const {
return m_pDocument.get();
}
-
-void CXFA_DocumentParser::CloseParser() {
- m_pDocument.reset();
- m_nodeParser.CloseParser();
-}
« no previous file with comments | « xfa/fxfa/parser/cxfa_document_parser.h ('k') | xfa/fxfa/parser/cxfa_simple_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698