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

Unified Diff: core/src/fxcodec/codec/fx_codec_icc.cpp

Issue 1084303002: Replace FX_NEW with new, remote tests from fxcodec (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 8 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/codec/fx_codec_flate.cpp ('k') | core/src/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcodec/codec/fx_codec_icc.cpp
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index 1a4fce63f2e2a7317a09ebb648abe7669ca74ccb..a984fecc3001e7ff09832b759e51f4577031788d 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -148,10 +148,7 @@ void* IccLib_CreateTransform(const unsigned char* pSrcProfileData, FX_DWORD dwSr
cmsCloseProfile(dstProfile);
return NULL;
}
- pCmm = FX_NEW CLcmsCmm;
- if (pCmm == NULL) {
- return NULL;
- }
+ pCmm = new CLcmsCmm;
pCmm->m_nSrcComponents = nSrcComponents;
pCmm->m_nDstComponents = nDstComponents;
pCmm->m_hTransform = hTransform;
@@ -438,10 +435,7 @@ FX_LPVOID CCodec_IccModule::CreateProfile(ICodec_IccModule::IccParam* pIccParam,
ASSERT(pTransformKey);
pTransformKey->AppendBlock(ProfileKey.GetBuffer(0), ProfileKey.GetLength());
if (!m_MapProfile.Lookup(ProfileKey, (FX_LPVOID&)pCache)) {
- pCache = FX_NEW CFX_IccProfileCache;
- if (pCache == NULL) {
- return NULL;
- }
+ pCache = new CFX_IccProfileCache;
switch (pIccParam->dwProfileType) {
case Icc_PARAMTYPE_BUFFER:
pCache->m_pProfile = cmsOpenProfileFromMem(pIccParam->pProfileData, pIccParam->dwProfileSize);
@@ -503,11 +497,7 @@ FX_LPVOID CCodec_IccModule::CreateTransform(ICodec_IccModule::IccParam* pInputPa
pCmm->m_nSrcComponents = T_CHANNELS(dwInputProfileType);
pCmm->m_nDstComponents = T_CHANNELS(dwOutputProfileType);
pCmm->m_bLab = T_COLORSPACE(pInputParam->dwFormat) == PT_Lab;
- pTransformCache = FX_NEW CFX_IccTransformCache(pCmm);
- if (pTransformCache == NULL) {
- FX_Free(pCmm);
- return NULL;
- }
+ pTransformCache = new CFX_IccTransformCache(pCmm);
if (pProofProfile) {
pTransformCache->m_pIccTransform = cmsCreateProofingTransform(pInputProfile, dwInputProfileType, pOutputProfile, dwOutputProfileType,
pProofProfile, dwIntent, dwPrfIntent, dwPrfFlag);
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_flate.cpp ('k') | core/src/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698