summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-05-16 15:56:53 -0700
committerTom Sepez <tsepez@chromium.org>2016-05-16 15:56:53 -0700
commitd3743ea4e62e870724be26d423c90204c8639463 (patch)
treef54ee0cd640a9480341844dac86a4178892c94e5 /xfa/fxfa/app
parentfa34e805fd03ba81bcfe1148cf96b24fe63b39a0 (diff)
downloadpdfium-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/app')
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 77c3b251a2..f33e4e0585 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -7,7 +7,6 @@
#include "xfa/fxfa/include/xfa_ffdoc.h"
#include <algorithm>
-#include <memory>
#include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
@@ -146,11 +145,10 @@ int32_t CXFA_FFDoc::DoLoad(IFX_Pause* pPause) {
if (!OpenDoc(pPDFDocument)) {
return XFA_PARSESTATUS_SyntaxErr;
}
- std::unique_ptr<IXFA_Parser> pParser(
- IXFA_Parser::Create(m_pDocument, TRUE));
- if (!pParser)
+ IXFA_Parser* pParser = IXFA_Parser::Create(m_pDocument, TRUE);
+ if (!pParser) {
return XFA_PARSESTATUS_SyntaxErr;
-
+ }
CXFA_Node* pRootNode = NULL;
if (pParser->StartParse(m_pStream) == XFA_PARSESTATUS_Ready &&
pParser->DoParse(NULL) == XFA_PARSESTATUS_Done) {
@@ -162,6 +160,8 @@ int32_t CXFA_FFDoc::DoLoad(IFX_Pause* pPause) {
} else {
iStatus = XFA_PARSESTATUS_StatusErr;
}
+ pParser->Release();
+ pParser = NULL;
}
return iStatus;
}
@@ -265,7 +265,7 @@ FX_BOOL CXFA_FFDoc::CloseDoc() {
m_TypeToDocViewMap.clear();
if (m_pDocument) {
- m_pDocument->DestroyParser();
+ m_pDocument->GetParser()->Release();
m_pDocument = nullptr;
}