Bug 1476313: Fix DEAD_STORE errors in xpcom/reflect/xptcall/md/unix/*. r=mccr8
authorRobert Bartlensky <rbartlensky@mozilla.com>
Thu, 19 Jul 2018 11:36:42 +0100
changeset 427787 e2374353593c
parent 427786 79f1e9fd7cb7
child 427788 fe9c353b57a1
push id66717
push usercsabou@mozilla.com
push dateMon, 23 Jul 2018 13:45:58 +0000
treeherderautoland@e2374353593c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1476313
milestone63.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 1476313: Fix DEAD_STORE errors in xpcom/reflect/xptcall/md/unix/*. r=mccr8 MozReview-Commit-ID: 29GpsKzXQhq
xpcom/reflect/xptcall/md/unix/xptcstubs_aarch64.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_alpha_openbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_arm.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_arm_netbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_arm_openbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_gcc_x86_unix.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ipf32.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ipf64.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_linux_alpha.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_linux_m68k.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_linux_s390.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_linux_s390x.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_mips.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_netbsd_m68k.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix64.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_linux.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_netbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_openbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_rhapsody.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_sparc64_openbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_netbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_openbsd.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_darwin.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp
xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp
xpcom/reflect/xptcall/md/win32/xptcstubs.cpp
xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64.cpp
xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64_gnu.cpp
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_aarch64.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_aarch64.cpp
@@ -22,17 +22,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 {
 #define PARAM_BUFFER_COUNT        16
 #define PARAM_GPR_COUNT            8
 #define PARAM_FPR_COUNT            8
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = NULL;
     const nsXPTMethodInfo* info;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
 
     uint32_t paramCount = info->GetParamCount();
 
@@ -176,17 +175,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                 break;
 
             default:
                 NS_ASSERTION(0, "bad type");
                 break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if (dispatchParams != paramBuffer) {
         delete [] dispatchParams;
     }
 
     return result;
 }
 
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_alpha_openbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_alpha_openbsd.cpp
@@ -18,17 +18,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
     const uint8_t PARAM_BUFFER_COUNT = 16;
     const uint8_t NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
 
     paramCount = info->GetParamCount();
 
     // setup variant array pointer
@@ -90,17 +89,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = (char)      *ap;    break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = (char16_t) *ap;    break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 /*
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_arm.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_arm.cpp
@@ -43,17 +43,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     paramCount = info->GetParamCount();
 
     // setup variant array pointer
     if(paramCount > PARAM_BUFFER_COUNT)
@@ -99,17 +98,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = *((char*)    ap);       break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 /*
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_netbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_netbsd.cpp
@@ -13,17 +13,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
     NS_ASSERTION(iface_info,"no interface info");
 
     iface_info->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no interface info");
@@ -66,17 +65,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = *((char*)    ap);       break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->CallMethod((uint16_t)methodIndex, info,
+                                       dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 /*
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_openbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_arm_openbsd.cpp
@@ -28,17 +28,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     paramCount = info->GetParamCount();
 
     // setup variant array pointer
     if(paramCount > PARAM_BUFFER_COUNT)
@@ -84,17 +83,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = *((char*)    ap);       break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 /*
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_gcc_x86_unix.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_gcc_x86_unix.cpp
@@ -15,17 +15,16 @@ PrepareAndDispatch(uint32_t methodIndex,
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     paramCount = info->GetParamCount();
 
     // setup variant array pointer
     if(paramCount > PARAM_BUFFER_COUNT)
@@ -56,17 +55,18 @@ PrepareAndDispatch(uint32_t methodIndex,
         switch(type)
         {
         case nsXPTType::T_I64    : dp->val.i64 = *((int64_t*) ap); ap++; break;
         case nsXPTType::T_U64    : dp->val.u64 = *((uint64_t*)ap); ap++; break;
         case nsXPTType::T_DOUBLE : dp->val.d   = *((double*)  ap); ap++; break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 } // extern "C"
 
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ipf32.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ipf32.cpp
@@ -20,17 +20,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
   uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
 {
 
 #define PARAM_BUFFER_COUNT     16
 
   nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
   nsXPTCMiniVariant* dispatchParams = nullptr;
   const nsXPTMethodInfo* info;
-  nsresult result = NS_ERROR_FAILURE;
   uint64_t* iargs = intargs;
   uint64_t* fargs = floatargs;
   uint8_t paramCount;
   uint8_t i;
 
   NS_ASSERTION(self,"no self");
 
   self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
@@ -116,17 +115,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
     else
     {
       /* we are parsing memory arguments */
       ++iargs;
       ++fargs;
     }
   }
 
-  result = self->mOuter->CallMethod((uint16_t) methodIndex, info, dispatchParams);
+  nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
+                                             dispatchParams);
 
   if(dispatchParams != paramBuffer)
     delete [] dispatchParams;
 
   return result;
 }
 
 extern "C" nsresult SharedStub(uint64_t,uint64_t,uint64_t,uint64_t,
@@ -146,9 +146,8 @@ uint64_t a8) \
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \
 { \
     NS_ERROR("nsXPTCStubBase::Sentinel called"); \
     return NS_ERROR_NOT_IMPLEMENTED; \
 }
 
 #include "xptcstubsdef.inc"
-
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ipf64.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ipf64.cpp
@@ -21,17 +21,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
   uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
 {
 
 #define PARAM_BUFFER_COUNT     16
 
   nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
   nsXPTCMiniVariant* dispatchParams = nullptr;
   const nsXPTMethodInfo* info;
-  nsresult result = NS_ERROR_FAILURE;
   uint64_t* iargs = intargs;
   uint64_t* fargs = floatargs;
   uint8_t paramCount;
   uint8_t i;
 
   NS_ASSERTION(self,"no self");
 
   self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
@@ -119,17 +118,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
     else
     {
       /* we are parsing memory arguments */
       ++iargs;
       ++fargs;
     }
   }
 
-  result = self->mOuter->CallMethod((uint16_t) methodIndex, info, dispatchParams);
+  nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
+                                             dispatchParams);
 
   if(dispatchParams != paramBuffer)
     delete [] dispatchParams;
 
   return result;
 }
 
 extern "C" nsresult SharedStub(uint64_t,uint64_t,uint64_t,uint64_t,
@@ -149,9 +149,8 @@ uint64_t a8) \
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \
 { \
     NS_ERROR("nsXPTCStubBase::Sentinel called"); \
     return NS_ERROR_NOT_IMPLEMENTED; \
 }
 
 #include "xptcstubsdef.inc"
-
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_alpha.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_alpha.cpp
@@ -18,17 +18,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
     const uint8_t PARAM_BUFFER_COUNT = 16;
     const uint8_t NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
 
     paramCount = info->GetParamCount();
 
     // setup variant array pointer
@@ -87,17 +86,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = (char)      *ap;    break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = (char16_t) *ap;    break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 /*
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_m68k.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_m68k.cpp
@@ -13,17 +13,16 @@ extern "C" {
     {
 #define PARAM_BUFFER_COUNT     16
 
         nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
         nsXPTCMiniVariant* dispatchParams = nullptr;
         const nsXPTMethodInfo* info;
         uint8_t paramCount;
         uint8_t i;
-        nsresult result = NS_ERROR_FAILURE;
 
         NS_ASSERTION(self,"no self");
 
         self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
         NS_ASSERTION(info,"no method info");
 
         paramCount = info->GetParamCount();
 
@@ -71,17 +70,18 @@ extern "C" {
             case nsXPTType::T_CHAR   : dp->val.c   = *(((char*)   ap) + 3);  break;
             case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
             default:
                 NS_ERROR("bad type");
                 break;
             }
         }
 
-        result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+        nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                                   dispatchParams);
 
         if(dispatchParams != paramBuffer)
             delete [] dispatchParams;
 
         return result;
     }
 }
 
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_s390.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_s390.cpp
@@ -14,17 +14,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no info");
 
     paramCount = info->GetParamCount();
 
@@ -142,17 +141,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                 dp->val.wc  = *((uint32_t*)a_ov ), a_ov++;
             break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n) \
@@ -183,9 +183,8 @@ nsresult nsXPTCStubBase::Stub##n() \
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \
 { \
     NS_ERROR("nsXPTCStubBase::Sentinel called"); \
     return NS_ERROR_NOT_IMPLEMENTED; \
 }
 
 #include "xptcstubsdef.inc"
-
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_s390x.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_linux_s390x.cpp
@@ -14,17 +14,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no info");
 
     paramCount = info->GetParamCount();
 
@@ -142,17 +141,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                 dp->val.wc  = *((uint64_t*)a_ov ), a_ov++;
             break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n) \
@@ -187,9 +187,8 @@ nsresult nsXPTCStubBase::Stub##n() \
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \
 { \
     NS_ERROR("nsXPTCStubBase::Sentinel called"); \
     return NS_ERROR_NOT_IMPLEMENTED; \
 }
 
 #include "xptcstubsdef.inc"
-
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_mips.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_mips.cpp
@@ -21,17 +21,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 
 #define PARAM_BUFFER_COUNT		16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
 
     paramCount = info->GetParamCount();
 
@@ -91,17 +90,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_FLOAT : dp->val.f   = *(float *)  ap; break;
         default:
             NS_ASSERTION(0, "bad type");
             break;
 #endif
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n) // done in the .s file
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_mips64.cpp
@@ -27,17 +27,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_GPR_COUNT            7
 #define PARAM_FPR_COUNT            7
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
 
     paramCount = info->GetParamCount();
 
@@ -170,17 +169,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
             break;
 
         default:
             NS_ASSERTION(0, "bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n)        /* defined in the assembly file */
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_netbsd_m68k.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_netbsd_m68k.cpp
@@ -18,17 +18,16 @@ extern "C" {
 #define PARAM_BUFFER_COUNT     16
 
         nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
         nsXPTCMiniVariant* dispatchParams = nullptr;
         const nsXPTInterfaceInfo* iface_info = nullptr;
         const nsXPTMethodInfo* info;
         uint8_t paramCount;
         uint8_t i;
-        nsresult result = NS_ERROR_FAILURE;
 
         NS_ASSERTION(self,"no self");
 
         self->GetInterfaceInfo(&iface_info);
         NS_ASSERTION(iface_info,"no interface info");
 
         iface_info->GetMethodInfo(uint16_t(methodIndex), &info);
         NS_ASSERTION(info,"no interface info");
@@ -75,17 +74,18 @@ extern "C" {
             // wchar_t is an int (32 bits) on NetBSD
             case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
             default:
                 NS_ERROR("bad type");
                 break;
             }
         }
 
-        result = self->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+        nsresult result = self->CallMethod((uint16_t)methodIndex, info,
+                                           dispatchParams);
 
         if(dispatchParams != paramBuffer)
             delete [] dispatchParams;
 
         return result;
     }
 }
 
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_pa32.cpp
@@ -24,17 +24,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
   } DU;
 
 #define PARAM_BUFFER_COUNT     16
 
   nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
   nsXPTCMiniVariant* dispatchParams = nullptr;
   const nsXPTMethodInfo* info;
   int32_t regwords = 1; /* self pointer is not in the variant records */
-  nsresult result = NS_ERROR_FAILURE;
   uint8_t paramCount;
   uint8_t i;
 
   NS_ASSERTION(self,"no self");
 
   self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
   NS_ASSERTION(info,"no method info");
   if (!info)
@@ -114,17 +113,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
     case nsXPTType::T_WCHAR  : dp->val.wc  = *((int32_t*)  args); break;
     default:
       NS_ERROR("bad type");
       break;
     }
     ++regwords;
   }
 
-  result = self->mOuter->CallMethod((uint16_t) methodIndex, info, dispatchParams);
+  nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
+                                             dispatchParams);
 
   if(dispatchParams != paramBuffer)
     delete [] dispatchParams;
 
   return result;
 }
 
 extern "C" nsresult SharedStub(int);
@@ -148,9 +148,8 @@ nsresult nsXPTCStubBase::Stub##n()  \
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \
 { \
     NS_ERROR("nsXPTCStubBase::Sentinel called"); \
     return NS_ERROR_NOT_IMPLEMENTED; \
 }
 
 #include "xptcstubsdef.inc"
-
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc64_linux.cpp
@@ -38,17 +38,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                    uint64_t *gprData,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
     if (! info)
         return NS_ERROR_UNEXPECTED;
 
@@ -124,18 +123,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
             else
                 NS_ERROR("bad type");
         }
 
         if (i >= 7)
             ap++;
     }
 
-    result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
-                                      dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
+                                               dispatchParams);
 
     if (dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 // Load r11 with the constant 'n' and branch to SharedStub().
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix.cpp
@@ -26,17 +26,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_BUFFER_COUNT     16
 #define PARAM_GPR_COUNT         7
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
 
     paramCount = info->GetParamCount();
 
@@ -166,17 +165,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                                          dp->val.wc  = (wchar_t)  *ap++;
                                      break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex,info,dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n)
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix64.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_aix64.cpp
@@ -21,17 +21,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_BUFFER_COUNT     16
 #define PARAM_GPR_COUNT         7
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
 
     paramCount = info->GetParamCount();
 
@@ -153,17 +152,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                                          dp->val.wc  = (wchar_t)  *ap++;
                                      break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex,info,dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n)
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_linux.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_linux.cpp
@@ -37,17 +37,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                    uint32_t *gprData,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info = nullptr;
     uint32_t paramCount;
     uint32_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
     if (! info)
         return NS_ERROR_UNEXPECTED;
 
@@ -158,19 +157,19 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  tempu32; break;
 
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex,
-                                      info,
-                                      dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex,
+                                               info,
+                                               dispatchParams);
 
     if (dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 // Load r11 with the constant 'n' and branch to SharedStub().
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_netbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_netbsd.cpp
@@ -35,17 +35,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
     NS_ASSERTION(iface_info,"no interface info");
     if (! iface_info)
         return NS_ERROR_UNEXPECTED;
 
@@ -142,17 +141,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  tempu32; break;
 
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->CallMethod((uint16_t) methodIndex, info, dispatchParams);
+    nsresult result = self->CallMethod((uint16_t) methodIndex, info,
+                                       dispatchParams);
 
     if (dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 // Load r11 with the constant 'n' and branch to SharedStub().
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_openbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_openbsd.cpp
@@ -34,17 +34,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                    uint32_t *gprData,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info = nullptr;
     uint32_t paramCount;
     uint32_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
     if (! info)
         return NS_ERROR_UNEXPECTED;
 
@@ -139,19 +138,19 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  tempu32; break;
 
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex,
-                                      info,
-                                      dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex,
+                                               info,
+                                               dispatchParams);
 
     if (dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 // Load r11 with the constant 'n' and branch to SharedStub().
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_rhapsody.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_rhapsody.cpp
@@ -45,17 +45,16 @@ PrepareAndDispatch(
 #define PARAM_FPR_COUNT    13
 #define PARAM_GPR_COUNT     7
 
   nsXPTCMiniVariant      paramBuffer[PARAM_BUFFER_COUNT];
   nsXPTCMiniVariant     *dispatchParams = nullptr;
   const nsXPTMethodInfo *methodInfo;
   uint8_t                paramCount;
   uint8_t                i;
-  nsresult               result         = NS_ERROR_FAILURE;
   uint32_t               argIndex       = 0;
   uint32_t               fprIndex       = 0;
 
   typedef struct {
     uint32_t hi;
     uint32_t lo;
   } DU;
 
@@ -139,17 +138,17 @@ PrepareAndDispatch(
           break;
         default:
           NS_ERROR("bad type");
           break;
       }
     }
   }
 
-  result = self->mOuter->
+  nsresult result = self->mOuter->
     CallMethod((uint16_t)methodIndex, methodInfo, dispatchParams);
 
   if(dispatchParams != paramBuffer)
     delete [] dispatchParams;
 
   return result;
 }
 
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc64_openbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc64_openbsd.cpp
@@ -16,17 +16,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no interface info");
 
     paramCount = info->GetParamCount();
 
@@ -74,17 +73,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_FLOAT  : dp->val.f   = ((float*)   ap)[1];     break;
         case nsXPTType::T_DOUBLE : dp->val.d   = *((double*) ap);        break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 extern "C" nsresult SharedStub(int, int*);
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_netbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_netbsd.cpp
@@ -22,17 +22,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
     NS_ASSERTION(iface_info,"no interface info");
 
     iface_info->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no interface info");
@@ -81,17 +80,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = *((uint32_t*)ap);       break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((int32_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->CallMethod((uint16_t)methodIndex, info,
+                                       dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 extern "C" nsresult SharedStub(int, int*);
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_openbsd.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_openbsd.cpp
@@ -22,17 +22,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
     NS_ASSERTION(iface_info,"no interface info");
 
     iface_info->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no interface info");
@@ -84,17 +83,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = *((uint32_t*)ap);       break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((int32_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->CallMethod((uint16_t)methodIndex, info,
+                                       dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 extern "C" nsresult SharedStub(int, int*);
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparc_solaris.cpp
@@ -21,17 +21,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no interface info");
 
     paramCount = info->GetParamCount();
 
@@ -82,17 +81,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = *((uint32_t*)ap);       break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((int32_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 extern "C" nsresult SharedStub(int, int*);
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_sparcv9_solaris.cpp
@@ -16,17 +16,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no interface info");
 
     paramCount = info->GetParamCount();
 
@@ -71,17 +70,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_CHAR   : dp->val.c   = *((uint64_t*)ap);       break;
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((int64_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 extern "C" nsresult SharedStub(int, int*);
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_darwin.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_darwin.cpp
@@ -33,17 +33,16 @@ extern "C" nsresult ATTRIBUTE_USED
 PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
                    uint64_t * args, uint64_t * gpregs, double *fpregs)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
     if (!info)
         return NS_ERROR_UNEXPECTED;
 
@@ -122,17 +121,18 @@ PrepareAndDispatch(nsXPTCStubBase * self
         case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  value; break;
 
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t) methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
+                                               dispatchParams);
 
     if (dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 // Darwin/x86-64 uses gcc >= 4.2
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp
@@ -33,17 +33,16 @@ extern "C" nsresult ATTRIBUTE_USED
 PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
                    uint64_t * args, uint64_t * gpregs, double *fpregs)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
     if (!info)
         return NS_ERROR_UNEXPECTED;
 
@@ -120,17 +119,18 @@ PrepareAndDispatch(nsXPTCStubBase * self
         case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  value; break;
 
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t) methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
+                                               dispatchParams);
 
     if (dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 // Linux/x86-64 uses gcc >= 3.1
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_solaris.cpp
@@ -33,17 +33,16 @@ extern "C" nsresult ATTRIBUTE_USED
 PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
                    uint64_t * args, uint64_t * gpregs, double *fpregs)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
     if (!info)
         return NS_ERROR_UNEXPECTED;
 
@@ -122,17 +121,18 @@ PrepareAndDispatch(nsXPTCStubBase * self
         case nsXPTType::T_WCHAR:   dp->val.wc  = (wchar_t)  value; break;
 
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t) methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t) methodIndex, info,
+                                               dispatchParams);
 
     if (dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n)
--- a/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_solaris.cpp
@@ -13,17 +13,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no interface info");
 
     paramCount = info->GetParamCount();
 
@@ -56,17 +55,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         switch(type)
         {
         case nsXPTType::T_I64    : dp->val.i64 = *((int64_t*) ap); ap++; break;
         case nsXPTType::T_U64    : dp->val.u64 = *((uint64_t*)ap); ap++; break;
         case nsXPTType::T_DOUBLE : dp->val.d   = *((double*)  ap); ap++; break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n)
--- a/xpcom/reflect/xptcall/md/win32/xptcstubs.cpp
+++ b/xpcom/reflect/xptcall/md/win32/xptcstubs.cpp
@@ -22,17 +22,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     // If anything fails before stackBytesToPop can be set then
     // the failure is completely catastrophic!
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
@@ -81,17 +80,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         case nsXPTType::T_WCHAR  : dp->val.wc  = *((wchar_t*) ap);       break;
         default:
             NS_ERROR("bad type");
             break;
         }
     }
     *stackBytesToPop = ((uint32_t)ap) - ((uint32_t)args);
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 } // extern "C"
--- a/xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64.cpp
+++ b/xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64.cpp
@@ -22,17 +22,16 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_GPR_COUNT   3
 #define PARAM_FPR_COUNT   3
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
 
     paramCount = info->GetParamCount();
 
@@ -174,17 +173,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
            break;
 
         default:
             NS_ERROR("bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n)  /* defined in the assembly file */
@@ -197,9 +197,8 @@ nsresult nsXPTCStubBase::Sentinel##n() \
 }
 
 #include "xptcstubsdef.inc"
 
 void
 xptc_dummy()
 {
 }
-
--- a/xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64_gnu.cpp
+++ b/xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64_gnu.cpp
@@ -26,17 +26,16 @@ PrepareAndDispatch(nsXPTCStubBase * self
 #define PARAM_GPR_COUNT   3
 #define PARAM_FPR_COUNT   3
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
-    nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self, "no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info, "no method info");
 
     paramCount = info->GetParamCount();
 
@@ -173,17 +172,18 @@ PrepareAndDispatch(nsXPTCStubBase * self
            break;
 
         default:
             NS_ASSERTION(0, "bad type");
             break;
         }
     }
 
-    result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams);
+    nsresult result = self->mOuter->CallMethod((uint16_t)methodIndex, info,
+                                               dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 __asm__ (
@@ -297,9 +297,8 @@ asm(".intel_syntax noprefix\n" /* this i
 #define SENTINEL_ENTRY(n) \
 nsresult nsXPTCStubBase::Sentinel##n() \
 { \
     NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
     return NS_ERROR_NOT_IMPLEMENTED; \
 }
 
 #include "xptcstubsdef.inc"
-