From afd0d1f488ea55da545b3310fd8f22e45522a695 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 4 Apr 2017 14:37:18 -0700 Subject: RefCount CPDF_StreamAcc all the time. Pass stream argument to constructor; it feels like a stream accessor should always be made from a stream rather than passing one in after the fact. Change-Id: Iaa46cb37677b81f0170f5d39bab76ad38ea4af44 Reviewed-on: https://pdfium-review.googlesource.com/3620 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fxcodec/jbig2/JBig2_Context.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp') diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp index 9261d16bfc..116abb7754 100644 --- a/core/fxcodec/jbig2/JBig2_Context.cpp +++ b/core/fxcodec/jbig2/JBig2_Context.cpp @@ -46,11 +46,12 @@ size_t GetRefAggContextSize(bool val) { // difference for typical JBIG2 documents. static const int kSymbolDictCacheMaxSize = 2; -CJBig2_Context::CJBig2_Context(CPDF_StreamAcc* pGlobalStream, - CPDF_StreamAcc* pSrcStream, - std::list* pSymbolDictCache, - IFX_Pause* pPause, - bool bIsGlobal) +CJBig2_Context::CJBig2_Context( + const CFX_RetainPtr& pGlobalStream, + const CFX_RetainPtr& pSrcStream, + std::list* pSymbolDictCache, + IFX_Pause* pPause, + bool bIsGlobal) : m_nSegmentDecoded(0), m_bInPage(false), m_bBufSpecified(false), -- cgit v1.2.3