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/fxfa/parser/cxfa_widetextread.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/fxfa/parser/cxfa_widetextread.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_widetextread.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/xfa/fxfa/parser/cxfa_widetextread.cpp b/xfa/fxfa/parser/cxfa_widetextread.cpp index cf03a09e7c..54442df7c0 100644 --- a/xfa/fxfa/parser/cxfa_widetextread.cpp +++ b/xfa/fxfa/parser/cxfa_widetextread.cpp @@ -12,17 +12,7 @@ #include "xfa/fgas/crt/fgas_codepage.h" CXFA_WideTextRead::CXFA_WideTextRead(const CFX_WideString& wsBuffer) - : m_wsBuffer(wsBuffer), m_iPosition(0), m_iRefCount(1) {} - -void CXFA_WideTextRead::Release() { - if (--m_iRefCount < 1) - delete this; -} - -IFGAS_Stream* CXFA_WideTextRead::Retain() { - m_iRefCount++; - return this; -} + : m_wsBuffer(wsBuffer), m_iPosition(0) {} uint32_t CXFA_WideTextRead::GetAccessModes() const { return FX_STREAMACCESS_Read | FX_STREAMACCESS_Text; @@ -98,9 +88,10 @@ uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) { return GetCodePage(); } -IFGAS_Stream* CXFA_WideTextRead::CreateSharedStream(uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) { +CFX_RetainPtr<IFGAS_Stream> CXFA_WideTextRead::CreateSharedStream( + uint32_t dwAccess, + int32_t iOffset, + int32_t iLength) { return nullptr; } |