зеркало из https://github.com/mozilla/pjs.git
Bug 310105 - NS_InitXPCOM2 in libxul should automatically bring in static components r=darin
This commit is contained in:
Родитель
869429c467
Коммит
f2c2a16ad9
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче