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

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

Issue 1359233002: Split up JBig2_GeneralDecoder.cpp. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
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
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 c8baa158e95bac16ec13ea64846ccd78713afe6c..b1e88b77368441c39c37dc097c416dc434c82b6c 100644
--- a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
@@ -7,9 +7,10 @@
#include "JBig2_ArithIntDecoder.h"
#include "../../../include/fxcrt/fx_memory.h"
+#include "JBig2_Define.h"
CJBig2_ArithIntDecoder::CJBig2_ArithIntDecoder() {
- IAx = FX_Alloc(JBig2ArithCtx, 512);
+ IAx = (JBig2ArithCtx*)FX_AllocOrDie(sizeof(JBig2ArithCtx), 512);
JBIG2_memset(IAx, 0, sizeof(JBig2ArithCtx) * 512);
}
CJBig2_ArithIntDecoder::~CJBig2_ArithIntDecoder() {
@@ -82,7 +83,8 @@ int CJBig2_ArithIntDecoder::decode(CJBig2_ArithDecoder* pArithDecoder,
}
CJBig2_ArithIaidDecoder::CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA) {
SBSYMCODELEN = SBSYMCODELENA;
- IAID = FX_Alloc(JBig2ArithCtx, 1 << SBSYMCODELEN);
+ IAID =
+ (JBig2ArithCtx*)FX_AllocOrDie(sizeof(JBig2ArithCtx), (1 << SBSYMCODELEN));
JBIG2_memset(IAID, 0, sizeof(JBig2ArithCtx) * (int)(1 << SBSYMCODELEN));
}
CJBig2_ArithIaidDecoder::~CJBig2_ArithIaidDecoder() {

Powered by Google App Engine
This is Rietveld 408576698