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

Unified Diff: core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp

Issue 1332153002: Merge to XFA: Make a bunch of JBig2 classes independent of CJBig2_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 3 months 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 | « core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h ('k') | core/src/fxcodec/jbig2/JBig2_BitStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
index 3aab2fb3e6c1d72c3d2a7df11de9e0e91558d9af..d12ab5a2e84046bcc5692f8b03c04152a1d45ba9 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) {
« no previous file with comments | « core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h ('k') | core/src/fxcodec/jbig2/JBig2_BitStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698