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

Side by Side Diff: xfa/fxfa/parser/cxfa_xml_parser.cpp

Issue 2559763002: Refcount IFGAS_ streams all the time, too (Closed)
Patch Set: more Created 4 years 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 unified diff | Download patch
« no previous file with comments | « xfa/fxfa/parser/cxfa_xml_parser.h ('k') | xfa/fxfa/parser/xfa_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/parser/cxfa_xml_parser.h" 7 #include "xfa/fxfa/parser/cxfa_xml_parser.h"
8 8
9 CXFA_XMLParser::CXFA_XMLParser(CFDE_XMLNode* pRoot, IFGAS_Stream* pStream) 9 CXFA_XMLParser::CXFA_XMLParser(CFDE_XMLNode* pRoot,
10 const CFX_RetainPtr<IFGAS_Stream>& pStream)
10 : m_nElementStart(0), 11 : m_nElementStart(0),
11 m_dwCheckStatus(0), 12 m_dwCheckStatus(0),
12 m_dwCurrentCheckStatus(0), 13 m_dwCurrentCheckStatus(0),
13 m_pRoot(pRoot), 14 m_pRoot(pRoot),
14 m_pStream(pStream), 15 m_pStream(pStream),
15 m_pParser(new CFDE_XMLSyntaxParser), 16 m_pParser(new CFDE_XMLSyntaxParser),
16 m_pParent(pRoot), 17 m_pParent(pRoot),
17 m_pChild(nullptr), 18 m_pChild(nullptr),
18 m_NodeStack(16), 19 m_NodeStack(16),
19 m_syntaxParserResult(FDE_XmlSyntaxResult::None) { 20 m_syntaxParserResult(FDE_XmlSyntaxResult::None) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 168 }
168 if (pPause && iCount > 500 && pPause->NeedToPauseNow()) { 169 if (pPause && iCount > 500 && pPause->NeedToPauseNow()) {
169 break; 170 break;
170 } 171 }
171 } 172 }
172 return (m_syntaxParserResult == FDE_XmlSyntaxResult::Error || 173 return (m_syntaxParserResult == FDE_XmlSyntaxResult::Error ||
173 m_NodeStack.GetSize() != 1) 174 m_NodeStack.GetSize() != 1)
174 ? -1 175 ? -1
175 : m_pParser->GetStatus(); 176 : m_pParser->GetStatus();
176 } 177 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/cxfa_xml_parser.h ('k') | xfa/fxfa/parser/xfa_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698