Backed out changeset c8d43645a578 (bug 320954) for burning leak tests
authorPhil Ringnalda <philringnalda@gmail.com>
Sat, 07 Feb 2009 14:38:26 -0800
changeset 24758 7a4f890c862d61c7d8d26f656a1f438e81c6c9d5
parent 24754 c8d43645a578b3e2d933328ed3088cbd4d98d371
child 24759 d9333047eac6b3efac023107661d36af815b3986
push id5220
push userphilringnalda@gmail.com
push dateSat, 07 Feb 2009 22:40:16 +0000
treeherdermozilla-central@d9333047eac6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs320954
milestone1.9.2a1pre
backs outc8d43645a578b3e2d933328ed3088cbd4d98d371
Backed out changeset c8d43645a578 (bug 320954) for burning leak tests
security/manager/ssl/src/nsNSSModule.cpp
--- a/security/manager/ssl/src/nsNSSModule.cpp
+++ b/security/manager/ssl/src/nsNSSModule.cpp
@@ -76,53 +76,46 @@
 #include "nsCertOverrideService.h"
 #include "nsRandomGenerator.h"
 #include "nsRecentBadCerts.h"
 #include "nsSSLStatus.h"
 #include "nsNSSIOLayer.h"
 
 // We must ensure that the nsNSSComponent has been loaded before
 // creating any other components.
-static nsresult EnsureNSSInitialized(PRBool triggeredByNSSComponent)
+static void EnsureNSSInitialized(PRBool triggeredByNSSComponent)
 {
   static PRBool haveLoaded = PR_FALSE;
   if (haveLoaded)
-    return NS_OK;
+    return;
 
+  haveLoaded = PR_TRUE;
+  
   if (triggeredByNSSComponent) {
     // We must prevent a recursion, as nsNSSComponent creates
     // additional instances
-    return NS_OK;
+    return;
   }
-
-  nsresult rv;
+  
   nsCOMPtr<nsISupports> nssComponent 
-    = do_GetService(PSM_COMPONENT_CONTRACTID, &rv);
-
-  if (NS_FAILED(rv))
-    return rv;
-
-  haveLoaded = PR_TRUE;
-  return NS_OK;
+    = do_GetService(PSM_COMPONENT_CONTRACTID);
 }
 
 // These two macros are ripped off from nsIGenericFactory.h and slightly
 // modified.
 #define NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(triggeredByNSSComponent,           \
                                                       _InstanceClass)         \
 static NS_IMETHODIMP                                                          \
 _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID,               \
                             void **aResult)                                   \
 {                                                                             \
     nsresult rv;                                                              \
     _InstanceClass * inst;                                                    \
                                                                               \
-    rv = EnsureNSSInitialized(triggeredByNSSComponent);                       \
-    if (NS_FAILED(rv))                                                        \
-        return rv;                                                            \
+    EnsureNSSInitialized(triggeredByNSSComponent);                            \
                                                                               \
     *aResult = NULL;                                                          \
     if (NULL != aOuter) {                                                     \
         rv = NS_ERROR_NO_AGGREGATION;                                         \
         return rv;                                                            \
     }                                                                         \
                                                                               \
     NS_NEWXPCOM(inst, _InstanceClass);                                        \
@@ -142,19 +135,17 @@ static NS_IMETHODIMP                    
                                                 _InstanceClass, _InitMethod)  \
 static NS_IMETHODIMP                                                          \
 _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID,               \
                             void **aResult)                                   \
 {                                                                             \
     nsresult rv;                                                              \
     _InstanceClass * inst;                                                    \
                                                                               \
-    rv = EnsureNSSInitialized(triggeredByNSSComponent);                       \
-    if (NS_FAILED(rv))                                                        \
-        return rv;                                                            \
+    EnsureNSSInitialized(triggeredByNSSComponent);                            \
                                                                               \
     *aResult = NULL;                                                          \
     if (NULL != aOuter) {                                                     \
         rv = NS_ERROR_NO_AGGREGATION;                                         \
         return rv;                                                            \
     }                                                                         \
                                                                               \
     NS_NEWXPCOM(inst, _InstanceClass);                                        \