Bug 569629 - Remove static xpcom modules list static initializer. r=bsmedberg,a=bsmedberg

This commit is contained in:
Mike Hommey 2010-11-07 09:25:38 +01:00
parent 27b48e3359
commit e171cc6f17
5 changed files with 9 additions and 13 deletions

View File

@ -59,15 +59,13 @@
#define MODULE(_name) \
NSMODULE_NAME(_name),
&NSMODULE_NAME(_name),
/**
* The nsStaticModuleInfo
*/
static const mozilla::Module *const kStaticModules[] = {
const mozilla::Module *const *const kPStaticModules[] = {
%MODULE_LIST%
#line 70 "nsStaticComponents.cpp.in"
NULL
};
mozilla::Module const *const *const kPStaticModules = kStaticModules;

View File

@ -43,6 +43,6 @@
// These symbols are provided by nsStaticComponents.cpp, and also by other
// static component providers such as nsStaticXULComponents (libxul).
extern mozilla::Module const *const *const kPStaticModules;
extern mozilla::Module const *const *const kPStaticModules[];
#endif

View File

@ -299,13 +299,11 @@ XUL_MODULES
#undef MODULE
#define MODULE(_name) \
NSMODULE_NAME(_name),
&NSMODULE_NAME(_name),
static const mozilla::Module *const kStaticModules[] = {
const mozilla::Module *const *const kPStaticModules[] = {
XUL_MODULES
NULL
};
#undef MODULE
mozilla::Module const *const *const kPStaticModules = kStaticModules;

View File

@ -1178,9 +1178,9 @@ ScopedXPCOMStartup::Initialize()
#ifndef _BUILD_STATIC_BIN
XRE_AddStaticComponent(&kXREModule);
#else
for (const mozilla::Module *const *staticModules = kPStaticModules;
for (const mozilla::Module *const *const *staticModules = kPStaticModules;
*staticModules; ++staticModules)
XRE_AddStaticComponent(*staticModules);
XRE_AddStaticComponent(**staticModules);
#endif
#endif

View File

@ -315,9 +315,9 @@ nsComponentManagerImpl::InitializeStaticModules()
sStaticModules = new nsTArray<const mozilla::Module*>;
#ifdef MOZ_ENABLE_LIBXUL
for (const mozilla::Module *const *staticModules = kPStaticModules;
for (const mozilla::Module *const *const *staticModules = kPStaticModules;
*staticModules; ++staticModules)
sStaticModules->AppendElement(*staticModules);
sStaticModules->AppendElement(**staticModules);
#endif
}