зеркало из https://github.com/mozilla/pjs.git
Merge for backout of changeset c8d43645a578 (bug 320954)
This commit is contained in:
Коммит
de24d35bdf
|
@ -81,27 +81,22 @@
|
|||
|
||||
// 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
|
||||
|
@ -115,9 +110,7 @@ _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
|
|||
nsresult rv; \
|
||||
_InstanceClass * inst; \
|
||||
\
|
||||
rv = EnsureNSSInitialized(triggeredByNSSComponent); \
|
||||
if (NS_FAILED(rv)) \
|
||||
return rv; \
|
||||
EnsureNSSInitialized(triggeredByNSSComponent); \
|
||||
\
|
||||
*aResult = NULL; \
|
||||
if (NULL != aOuter) { \
|
||||
|
@ -147,9 +140,7 @@ _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
|
|||
nsresult rv; \
|
||||
_InstanceClass * inst; \
|
||||
\
|
||||
rv = EnsureNSSInitialized(triggeredByNSSComponent); \
|
||||
if (NS_FAILED(rv)) \
|
||||
return rv; \
|
||||
EnsureNSSInitialized(triggeredByNSSComponent); \
|
||||
\
|
||||
*aResult = NULL; \
|
||||
if (NULL != aOuter) { \
|
||||
|
|
Загрузка…
Ссылка в новой задаче