diff options
author | tsepez <tsepez@chromium.org> | 2016-12-07 12:10:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-07 12:10:20 -0800 |
commit | 7cda31ac2f2884166f044937619478a6103198cf (patch) | |
tree | 640f14ab5c81696cfffdedf0644eac4b1f2bc47f /xfa/fde/xml/fde_xml_imp.cpp | |
parent | ab5a20d9de8c801b8376bfe2d6f7cf9ac7d26028 (diff) | |
download | pdfium-7cda31ac2f2884166f044937619478a6103198cf.tar.xz |
Refcount IFGAS_ streams all the time, too
IFGAS_Streams are not part of the IFX_Stream hierarchy, but
can be made from such.
Review-Url: https://codereview.chromium.org/2559763002
Diffstat (limited to 'xfa/fde/xml/fde_xml_imp.cpp')
-rw-r--r-- | xfa/fde/xml/fde_xml_imp.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp index 1fbb1cdda7..f333b4fcda 100644 --- a/xfa/fde/xml/fde_xml_imp.cpp +++ b/xfa/fde/xml/fde_xml_imp.cpp @@ -394,7 +394,7 @@ CFDE_XMLNode* CFDE_XMLNode::Clone(bool bRecursive) { return nullptr; } -void CFDE_XMLNode::SaveXMLNode(IFGAS_Stream* pXMLStream) { +void CFDE_XMLNode::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream) { CFDE_XMLNode* pNode = (CFDE_XMLNode*)this; switch (pNode->GetType()) { case FDE_XMLNODE_Instruction: { @@ -986,7 +986,8 @@ void CFDE_XMLDoc::CloseXML() { ReleaseParser(); } -void CFDE_XMLDoc::SaveXMLNode(IFGAS_Stream* pXMLStream, CFDE_XMLNode* pINode) { +void CFDE_XMLDoc::SaveXMLNode(const CFX_RetainPtr<IFGAS_Stream>& pXMLStream, + CFDE_XMLNode* pINode) { CFDE_XMLNode* pNode = (CFDE_XMLNode*)pINode; switch (pNode->GetType()) { case FDE_XMLNODE_Instruction: { @@ -1096,7 +1097,8 @@ void CFDE_XMLDoc::SaveXMLNode(IFGAS_Stream* pXMLStream, CFDE_XMLNode* pINode) { } } -void CFDE_XMLDoc::SaveXML(IFGAS_Stream* pXMLStream, bool bSaveBOM) { +void CFDE_XMLDoc::SaveXML(CFX_RetainPtr<IFGAS_Stream>& pXMLStream, + bool bSaveBOM) { if (!pXMLStream || pXMLStream == m_pStream) { m_pStream->Seek(FX_STREAMSEEK_Begin, 0); pXMLStream = m_pStream; @@ -1288,7 +1290,7 @@ CFDE_XMLSyntaxParser::CFDE_XMLSyntaxParser() m_CurNode.eNodeType = FDE_XMLNODE_Unknown; } -void CFDE_XMLSyntaxParser::Init(IFGAS_Stream* pStream, +void CFDE_XMLSyntaxParser::Init(const CFX_RetainPtr<IFGAS_Stream>& pStream, int32_t iXMLPlaneSize, int32_t iTextDataSize) { ASSERT(!m_pStream && !m_pBuffer); |