Remove checks in fxcrt now that FX_NEW can't return 0.

Replace them with |new| so that we can tell by the presence of FX_NEW
the places that still need to be audited.

R=thestig@google.com, thestig@chromium.org

Review URL: https://codereview.chromium.org/1052553006
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index 7b700d3..275653e 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -1271,12 +1271,8 @@
             if (m_pObject->m_RefCount <= 0) {
                 delete m_pObject;
             }
-            m_pObject = NULL;
         }
-        m_pObject = FX_NEW CountedObj;
-        if (!m_pObject) {
-            return NULL;
-        }
+        m_pObject = new CountedObj;
         m_pObject->m_RefCount = 1;
         return m_pObject;
     }
@@ -1331,18 +1327,13 @@
     ObjClass*			GetModify()
     {
         if (m_pObject == NULL) {
-            m_pObject = FX_NEW CountedObj;
-            if (m_pObject) {
-                m_pObject->m_RefCount = 1;
-            }
+            m_pObject = new CountedObj;
+            m_pObject->m_RefCount = 1;
         } else if (m_pObject->m_RefCount > 1) {
             m_pObject->m_RefCount --;
             CountedObj* pOldObject = m_pObject;
-            m_pObject = NULL;
-            m_pObject = FX_NEW CountedObj(*pOldObject);
-            if (m_pObject) {
-                m_pObject->m_RefCount = 1;
-            }
+            m_pObject = new CountedObj(*pOldObject);
+            m_pObject->m_RefCount = 1;
         }
         return m_pObject;
     }
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index 272d43e..98839b4 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -318,20 +318,14 @@
 {
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 #ifndef _WIN32_WCE
-    CFindFileDataA* pData = FX_NEW CFindFileDataA;
-    if (!pData) {
-        return NULL;
-    }
+    CFindFileDataA* pData = new CFindFileDataA;
 #ifdef _FX_WINAPI_PARTITION_DESKTOP_
     pData->m_Handle = FindFirstFileA(CFX_ByteString(path) + "/*.*", &pData->m_FindData);
 #else
     pData->m_Handle = FindFirstFileExA(CFX_ByteString(path) + "/*.*", FindExInfoStandard, &pData->m_FindData, FindExSearchNameMatch, NULL, 0);
 #endif
 #else
-    CFindFileDataW* pData = FX_NEW CFindFileDataW;
-    if (!pData) {
-        return NULL;
-    }
+    CFindFileDataW* pData = new CFindFileDataW;
     pData->m_Handle = FindFirstFileW(CFX_WideString::FromLocal(path) + L"/*.*", &pData->m_FindData);
 #endif
     if (pData->m_Handle == INVALID_HANDLE_VALUE) {
@@ -348,10 +342,7 @@
 void* FX_OpenFolder(FX_LPCWSTR path)
 {
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-    CFindFileDataW* pData = FX_NEW CFindFileDataW;
-    if (!pData) {
-        return NULL;
-    }
+    CFindFileDataW* pData = new CFindFileDataW;
 #ifdef _FX_WINAPI_PARTITION_DESKTOP_
     pData->m_Handle = FindFirstFileW(CFX_WideString(path) + L"/*.*", &pData->m_FindData);
 #else
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index 8049a55..2c069cb 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -14,18 +14,12 @@
 }
 FX_BOOL CXML_Parser::Init(FX_LPBYTE pBuffer, size_t size)
 {
-    m_pDataAcc = FX_NEW CXML_DataBufAcc(pBuffer, size);
-    if (!m_pDataAcc) {
-        return FALSE;
-    }
+    m_pDataAcc = new CXML_DataBufAcc(pBuffer, size);
     return Init(TRUE);
 }
 FX_BOOL CXML_Parser::Init(IFX_FileRead *pFileRead)
 {
-    m_pDataAcc = FX_NEW CXML_DataStmAcc(pFileRead);
-    if (!m_pDataAcc) {
-        return FALSE;
-    }
+    m_pDataAcc = new CXML_DataStmAcc(pFileRead);
     return Init(TRUE);
 }
 FX_BOOL CXML_Parser::Init(IFX_BufferRead *pBuffer)
@@ -377,15 +371,9 @@
     if (tag_name.IsEmpty() || bEndTag) {
         return NULL;
     }
-    CXML_Element* pElement;
-    pElement = FX_NEW CXML_Element;
-    if (pElement) {
-        pElement->m_pParent = pParent;
-        pElement->SetTag(tag_space, tag_name);
-    }
-    if (!pElement) {
-        return NULL;
-    }
+    CXML_Element* pElement = new CXML_Element;
+    pElement->m_pParent = pParent;
+    pElement->SetTag(tag_space, tag_name);
     do {
         CFX_ByteString attr_space, attr_name;
         while (m_dwIndex < m_dwBufferSize) {
@@ -529,11 +517,7 @@
     if (content.IsEmpty()) {
         return;
     }
-    CXML_Content* pContent;
-    pContent = FX_NEW CXML_Content;
-    if (!pContent) {
-        return;
-    }
+    CXML_Content* pContent = new CXML_Content;
     pContent->Set(bCDATA, content);
     pElement->m_Children.Add((FX_LPVOID)CXML_Element::Content);
     pElement->m_Children.Add(pContent);
@@ -818,10 +802,7 @@
         }
     }
     if (!m_pMap) {
-        m_pMap = FX_NEW CFX_ObjectArray < CXML_AttrItem > ;
-    }
-    if (!m_pMap) {
-        return;
+        m_pMap = new CFX_ObjectArray<CXML_AttrItem>;
     }
     CXML_AttrItem* pItem = (CXML_AttrItem*)m_pMap->AddSpace();
     if (!pItem) {