From cdfc035f4ea2e786c7d7820e143c18bdb11fac3f Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 26 May 2017 12:21:14 -0700 Subject: Pass CJBig2_ArithDecoder to CJBig2_GRDProc as needed. Avoid holding a stale pointer to it in CJBig2_GRDProc. Bug: 726732 Change-Id: Ia3797a3e087f61bd2126f867fd5a282e873de5bc Reviewed-on: https://pdfium-review.googlesource.com/6050 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fxcodec/jbig2/JBig2_GrdProc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/fxcodec/jbig2/JBig2_GrdProc.h') diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h index c6e8ae38d0..3e4d3d403e 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.h +++ b/core/fxcodec/jbig2/JBig2_GrdProc.h @@ -32,7 +32,8 @@ class CJBig2_GRDProc { IFX_Pause* pPause); FXCODEC_STATUS Start_decode_MMR(CJBig2_Image** pImage, CJBig2_BitStream* pStream); - FXCODEC_STATUS Continue_decode(IFX_Pause* pPause); + FXCODEC_STATUS Continue_decode(IFX_Pause* pPause, + CJBig2_ArithDecoder* pArithDecoder); FX_RECT GetReplaceRect() const { return m_ReplaceRect; } bool MMR; @@ -49,7 +50,8 @@ class CJBig2_GRDProc { bool UseTemplate1Opt3() const; bool UseTemplate23Opt3() const; - FXCODEC_STATUS decode_Arith(IFX_Pause* pPause); + FXCODEC_STATUS decode_Arith(IFX_Pause* pPause, + CJBig2_ArithDecoder* pArithDecoder); FXCODEC_STATUS decode_Arith_Template0_opt3(CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, @@ -114,7 +116,6 @@ class CJBig2_GRDProc { uint8_t* m_pLine; FXCODEC_STATUS m_ProssiveStatus; CJBig2_Image** m_pImage; - CFX_UnownedPtr m_pArithDecoder; JBig2ArithCtx* m_gbContext; uint16_t m_DecodeType; int m_LTP; -- cgit v1.2.3