Bug 310105 - NS_InitXPCOM2 in libxul should automatically bring in static components r=darin

This commit is contained in:
bsmedberg%covad.net 2005-09-27 19:25:39 +00:00
Родитель fb313072a0
Коммит 0b15ba16be
2 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -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;