Bug 310105 - NS_InitXPCOM2 in libxul should automatically bring in static components r=darin
git-svn-id: svn://10.0.0.236/trunk@181067 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ca997fd10e
commit
290d6072d2
@ -159,14 +159,15 @@ struct nsStaticModuleInfo {
|
||||
* registry preferences and so on; or use
|
||||
* <CODE>nsnull</CODE> for the default behaviour.
|
||||
*
|
||||
* @param staticComponents An array of static components. Passing null is
|
||||
* Equivalent to NS_InitXPCOM2. These static components
|
||||
* will be registered before any other components.
|
||||
* @param staticComponents An array of static components. Passing null causes
|
||||
* default (builtin) components to be registered, if
|
||||
* present.
|
||||
* @param componentCount Number of elements in staticComponents
|
||||
*
|
||||
* @see NS_NewLocalFile
|
||||
* @see nsILocalFile
|
||||
* @see nsIDirectoryServiceProvider
|
||||
* @see XRE_GetStaticComponents
|
||||
*
|
||||
* @return NS_OK for success;
|
||||
* NS_ERROR_NOT_INITIALIZED if static globals were not initialized,
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsXPCOMPrivate.h"
|
||||
#include "nscore.h"
|
||||
#include "nsStaticComponents.h"
|
||||
#include "prlink.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsObserverList.h"
|
||||
@ -454,6 +455,13 @@ nsresult NS_COM NS_InitXPCOM3(nsIServiceManager* *result,
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
#ifdef MOZ_ENABLE_LIBXUL
|
||||
if (!staticComponents) {
|
||||
staticComponents = kPStaticModules;
|
||||
componentCount = kStaticModuleCount;
|
||||
}
|
||||
#endif
|
||||
|
||||
// We are not shutting down
|
||||
gXPCOMShuttingDown = PR_FALSE;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user