summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_Context.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-26 13:42:15 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-26 20:58:50 +0000
commit56e5e67fd2ac582dcfa83821c815a0014a43bd10 (patch)
treeee31af73d2c1d4497c1867c262c47039a3b5d854 /core/fxcodec/jbig2/JBig2_Context.cpp
parent385d32f64613f08bad5cb63f0b8dc4f847f240f4 (diff)
downloadpdfium-chromium/3113.tar.xz
IFX_Pause is passed to CJBig2_Context, no need to store.chromium/3113
Avoids the possibility of having a stale pointer in the context. Bug: 726653 Change-Id: I8b41d2ab04e7ab07e694431b53491b3d0861e4ee Reviewed-on: https://pdfium-review.googlesource.com/6074 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 69a9dd0daa..275c69915c 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -50,20 +50,18 @@ CJBig2_Context::CJBig2_Context(
const CFX_RetainPtr<CPDF_StreamAcc>& pGlobalStream,
const CFX_RetainPtr<CPDF_StreamAcc>& pSrcStream,
std::list<CJBig2_CachePair>* pSymbolDictCache,
- IFX_Pause* pPause,
bool bIsGlobal)
: m_nSegmentDecoded(0),
m_bInPage(false),
m_bBufSpecified(false),
m_PauseStep(10),
- m_pPause(pPause),
m_ProcessingStatus(FXCODEC_STATUS_FRAME_READY),
m_dwOffset(0),
m_pSymbolDictCache(pSymbolDictCache),
m_bIsGlobal(bIsGlobal) {
- if (pGlobalStream && (pGlobalStream->GetSize() > 0)) {
+ if (pGlobalStream && pGlobalStream->GetSize() > 0) {
m_pGlobalContext = pdfium::MakeUnique<CJBig2_Context>(
- nullptr, pGlobalStream, pSymbolDictCache, pPause, true);
+ nullptr, pGlobalStream, pSymbolDictCache, true);
}
m_pStream = pdfium::MakeUnique<CJBig2_BitStream>(pSrcStream);
}
@@ -131,7 +129,7 @@ int32_t CJBig2_Context::decode_RandomOrgnazation_FirstPage(IFX_Pause* pPause) {
break;
}
m_SegmentList.push_back(std::move(pSegment));
- if (pPause && m_pPause && pPause->NeedToPauseNow()) {
+ if (pPause && pPause->NeedToPauseNow()) {
m_PauseStep = 3;
m_ProcessingStatus = FXCODEC_STATUS_DECODE_TOBECONTINUE;
return JBIG2_SUCCESS;