Replace FX_NEW with new, remote tests from fxcodec

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1084303002
diff --git a/core/src/fxcodec/codec/fx_codec.cpp b/core/src/fxcodec/codec/fx_codec.cpp
index 456ec40..d4df196 100644
--- a/core/src/fxcodec/codec/fx_codec.cpp
+++ b/core/src/fxcodec/codec/fx_codec.cpp
@@ -8,13 +8,13 @@
 #include "codec_int.h"
 CCodec_ModuleMgr::CCodec_ModuleMgr()
 {
-    m_pBasicModule = FX_NEW CCodec_BasicModule;
-    m_pFaxModule = FX_NEW CCodec_FaxModule;
-    m_pJpegModule = FX_NEW CCodec_JpegModule;
-    m_pJpxModule = FX_NEW CCodec_JpxModule;
-    m_pJbig2Module = FX_NEW CCodec_Jbig2Module;
-    m_pIccModule = FX_NEW CCodec_IccModule;
-    m_pFlateModule = FX_NEW CCodec_FlateModule;
+    m_pBasicModule = new CCodec_BasicModule;
+    m_pFaxModule = new CCodec_FaxModule;
+    m_pJpegModule = new CCodec_JpegModule;
+    m_pJpxModule = new CCodec_JpxModule;
+    m_pJbig2Module = new CCodec_Jbig2Module;
+    m_pIccModule = new CCodec_IccModule;
+    m_pFlateModule = new CCodec_FlateModule;
 }
 CCodec_ModuleMgr::~CCodec_ModuleMgr()
 {
@@ -243,7 +243,7 @@
 }
 CCodec_ModuleMgr* CCodec_ModuleMgr::Create()
 {
-    return FX_NEW CCodec_ModuleMgr;
+    return new CCodec_ModuleMgr;
 }
 void CCodec_ModuleMgr::Destroy()
 {
@@ -433,10 +433,7 @@
 ICodec_ScanlineDecoder* CCodec_BasicModule::CreateRunLengthDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
         int nComps, int bpc)
 {
-    CCodec_RLScanlineDecoder* pRLScanlineDecoder = FX_NEW CCodec_RLScanlineDecoder;
-    if (pRLScanlineDecoder == NULL) {
-        return NULL;
-    }
+    CCodec_RLScanlineDecoder* pRLScanlineDecoder = new CCodec_RLScanlineDecoder;
     if (!pRLScanlineDecoder->Create(src_buf, src_size, width, height, nComps, bpc)) {
         delete pRLScanlineDecoder;
         return NULL;
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp
index c6ab791..667b713 100644
--- a/core/src/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/src/fxcodec/codec/fx_codec_fax.cpp
@@ -994,10 +994,7 @@
 ICodec_ScanlineDecoder*	CCodec_FaxModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
         int K, FX_BOOL EndOfLine, FX_BOOL EncodedByteAlign, FX_BOOL BlackIs1, int Columns, int Rows)
 {
-    CCodec_FaxDecoder* pDecoder = FX_NEW CCodec_FaxDecoder;
-    if (pDecoder == NULL) {
-        return NULL;
-    }
+    CCodec_FaxDecoder* pDecoder = new CCodec_FaxDecoder;
     pDecoder->Create(src_buf, src_size, width, height, K, EndOfLine, EncodedByteAlign, BlackIs1, Columns, Rows);
     return pDecoder;
 }
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index afdb835..3e1aa36 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -851,10 +851,7 @@
 ICodec_ScanlineDecoder*	CCodec_FlateModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size, int width, int height,
         int nComps, int bpc, int predictor, int Colors, int BitsPerComponent, int Columns)
 {
-    CCodec_FlateScanlineDecoder* pDecoder = FX_NEW CCodec_FlateScanlineDecoder;
-    if (pDecoder == NULL) {
-        return NULL;
-    }
+    CCodec_FlateScanlineDecoder* pDecoder = new CCodec_FlateScanlineDecoder;
     pDecoder->Create(src_buf, src_size, width, height, nComps, bpc, predictor, Colors, BitsPerComponent, Columns);
     return pDecoder;
 }
@@ -874,10 +871,7 @@
         }
     }
     if (bLZW) {
-        pDecoder = FX_NEW CLZWDecoder;
-        if (pDecoder == NULL) {
-            return -1;
-        }
+        pDecoder = new CLZWDecoder;
         dest_size = (FX_DWORD) - 1;
         offset = src_size;
         int err = pDecoder->Decode(NULL, dest_size, src_buf, offset, bEarlyChange);
@@ -885,10 +879,7 @@
         if (err || dest_size == 0 || dest_size + 1 < dest_size) {
             return (FX_DWORD) - 1;
         }
-        pDecoder = FX_NEW CLZWDecoder;
-        if (pDecoder == NULL) {
-            return -1;
-        }
+        pDecoder = new CLZWDecoder;
         dest_buf = FX_Alloc( FX_BYTE, dest_size + 1);
         if (dest_buf == NULL) {
             return -1;
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index 1a4fce6..a984fec 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -148,10 +148,7 @@
         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 @@
     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 @@
         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);
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index 173f7a7..278d9cb 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -15,7 +15,7 @@
 }
 void* CCodec_Jbig2Module::CreateJbig2Context()
 {
-    return FX_NEW CCodec_Jbig2Context();
+    return new CCodec_Jbig2Context();
 }
 void CCodec_Jbig2Module::DestroyJbig2Context(void* pJbig2Content)
 {
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 489f099..d4c9926 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -484,10 +484,7 @@
     if (src_buf == NULL || src_size == 0) {
         return NULL;
     }
-    CCodec_JpegDecoder* pDecoder = FX_NEW CCodec_JpegDecoder;
-    if (pDecoder == NULL) {
-        return NULL;
-    }
+    CCodec_JpegDecoder* pDecoder = new CCodec_JpegDecoder;
     if (!pDecoder->Create(src_buf, src_size, width, height, nComps, ColorTransform, m_pExtProvider)) {
         delete pDecoder;
         return NULL;
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 0f0d2e5..3b0490f 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -801,10 +801,7 @@
 }
 void* CCodec_JpxModule::CreateDecoder(FX_LPCBYTE src_buf, FX_DWORD src_size , FX_BOOL useColorSpace)
 {
-    CJPX_Decoder* pDecoder = FX_NEW CJPX_Decoder;
-    if (pDecoder == NULL) {
-        return NULL;
-    }
+    CJPX_Decoder* pDecoder = new CJPX_Decoder;
     pDecoder->m_useColorSpace = useColorSpace;
     if (!pDecoder->Init(src_buf, src_size)) {
         delete pDecoder;