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

Unified Diff: xfa/fxfa/parser/cxfa_widetextread.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/cxfa_widetextread.h ('k') | xfa/fxfa/parser/cxfa_xml_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/cxfa_widetextread.cpp
diff --git a/xfa/fxfa/parser/cxfa_widetextread.cpp b/xfa/fxfa/parser/cxfa_widetextread.cpp
index cf03a09e7c598d61b40983ac48eae1d16e8905e8..54442df7c032e61d6f893a77dc63b626d255e935 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;
}
« no previous file with comments | « xfa/fxfa/parser/cxfa_widetextread.h ('k') | xfa/fxfa/parser/cxfa_xml_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698