Bug 296561 - rework static component loading so that nsIXULAppInfo/Runtime/etc are available during autoregistration/xpcom-startup notification (and make static component loading saner in general) - r=shaver+dougt, a=asa

git-svn-id: svn://10.0.0.236/trunk@176383 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bsmedberg%covad.net
2005-07-21 13:33:43 +00:00
parent 338b11b70a
commit b7271f1273
39 changed files with 492 additions and 601 deletions

View File

@@ -82,8 +82,11 @@ static XPCOMCleanupHack sXPCOMCleanupHack;
#endif
nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
nsIDirectoryServiceProvider *appFileLocProvider)
NS_METHOD
NS_InitEmbedding(nsILocalFile *mozBinDirectory,
nsIDirectoryServiceProvider *appFileLocProvider,
nsStaticModuleInfo const *aStaticComponents,
PRUint32 aStaticComponentCount)
{
nsresult rv;
@@ -99,7 +102,8 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
#endif
{
// Initialise XPCOM
rv = NS_InitXPCOM2(&sServiceManager, mozBinDirectory, appFileLocProvider);
rv = NS_InitXPCOM3(&sServiceManager, mozBinDirectory, appFileLocProvider,
aStaticComponents, aStaticComponentCount);
NS_ENSURE_SUCCESS(rv, rv);
#ifdef HACK_AROUND_NONREENTRANT_INITXPCOM
@@ -193,7 +197,8 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
return NS_OK;
}
nsresult NS_TermEmbedding()
NS_METHOD
NS_TermEmbedding()
{
// Reentrant calls to this method do nothing except decrement a counter
if (sInitCounter > 1)