diff options
author | Lei Zhang <thestig@chromium.org> | 2015-09-10 16:34:17 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-09-10 16:34:17 -0700 |
commit | a7f5386053136db6d41b1fc4943544ec623704c3 (patch) | |
tree | 3c8e8345078b166fcbd55bd2f258de98146e00b3 /core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp | |
parent | 808a99e8c6f72713ca9492508faa4b8445ae0d33 (diff) | |
download | pdfium-a7f5386053136db6d41b1fc4943544ec623704c3.tar.xz |
Merge to XFA: Make a bunch of JBig2 classes independent of CJBig2_Object.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1319713003 .
(cherry picked from commit 800bf5ac07305ccf9c9522c8c76f728a4fd99da5)
Review URL: https://codereview.chromium.org/1332153002 .
Diffstat (limited to 'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp')
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp index 3aab2fb3e6..d12ab5a2e8 100644 --- a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp +++ b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp @@ -5,12 +5,15 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "JBig2_ArithIntDecoder.h" + +#include "../../../include/fxcrt/fx_memory.h" + CJBig2_ArithIntDecoder::CJBig2_ArithIntDecoder() { - IAx = (JBig2ArithCtx*)m_pModule->JBig2_Malloc2(sizeof(JBig2ArithCtx), 512); + IAx = (JBig2ArithCtx*)FX_AllocOrDie(sizeof(JBig2ArithCtx), 512); JBIG2_memset(IAx, 0, sizeof(JBig2ArithCtx) * 512); } CJBig2_ArithIntDecoder::~CJBig2_ArithIntDecoder() { - m_pModule->JBig2_Free(IAx); + FX_Free(IAx); } int CJBig2_ArithIntDecoder::decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult) { @@ -79,12 +82,12 @@ int CJBig2_ArithIntDecoder::decode(CJBig2_ArithDecoder* pArithDecoder, } CJBig2_ArithIaidDecoder::CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA) { SBSYMCODELEN = SBSYMCODELENA; - IAID = (JBig2ArithCtx*)m_pModule->JBig2_Malloc2(sizeof(JBig2ArithCtx), - (1 << SBSYMCODELEN)); + IAID = + (JBig2ArithCtx*)FX_AllocOrDie(sizeof(JBig2ArithCtx), (1 << SBSYMCODELEN)); JBIG2_memset(IAID, 0, sizeof(JBig2ArithCtx) * (int)(1 << SBSYMCODELEN)); } CJBig2_ArithIaidDecoder::~CJBig2_ArithIaidDecoder() { - m_pModule->JBig2_Free(IAID); + FX_Free(IAID); } int CJBig2_ArithIaidDecoder::decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult) { |