Bug 1189423 - part 2 - Remove superfluous |new| result check. r=froydnj
authorAndrew McCreight <continuation@gmail.com>
Thu, 30 Jul 2015 15:06:00 +0200
changeset 288160 b1e940e0912733ba458eb1770f6f673d5a78f7f2
parent 288159 4a4b5cc7433b42a16b7bb73026161c6ead1fe3b9
child 288161 365302c182170f31093e1f5f3984511e882099fd
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1189423
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1189423 - part 2 - Remove superfluous |new| result check. r=froydnj
xpcom/reflect/xptcall/xptcall.cpp
--- a/xpcom/reflect/xptcall/xptcall.cpp
+++ b/xpcom/reflect/xptcall/xptcall.cpp
@@ -56,21 +56,17 @@ NS_GetXPTCallStub(REFNSIID aIID, nsIXPTC
     if (iie->GetHasNotXPCOMFlag()) {
 #ifdef DEBUG
         nsPrintfCString msg("XPTCall will not implement interface %s because of [notxpcom] members.", iie->GetTheName());
         NS_WARNING(msg.get());
 #endif
         return NS_ERROR_FAILURE;
     }
 
-    nsXPTCStubBase* newbase = new nsXPTCStubBase(aOuter, iie);
-    if (!newbase)
-        return NS_ERROR_OUT_OF_MEMORY;
-
-    *aResult = newbase;
+    *aResult = new nsXPTCStubBase(aOuter, iie);
     return NS_OK;
 }
 
 EXPORT_XPCOM_API(void)
 NS_DestroyXPTCallStub(nsISomeInterface* aStub)
 {
     nsXPTCStubBase* stub = static_cast<nsXPTCStubBase*>(aStub);
     delete(stub);