Relanding 157597 - Make embedding base and examples use XPCOM Glue. r=adamlock, sr=rpotts

git-svn-id: svn://10.0.0.236/trunk@130248 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dougt%netscape.com
2002-09-23 17:21:47 +00:00
parent f8cd5c4215
commit d7be4a17ef
12 changed files with 106 additions and 43 deletions

View File

@@ -22,6 +22,10 @@
* Contributor(s):
*/
#ifdef XPCOM_GLUE
#include "nsXPCOMGlue.h"
#endif
#include "nsIServiceManager.h"
#include "nsIComponentRegistrar.h"
#include "nsIAppStartupNotifier.h"
@@ -83,6 +87,11 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
if (!sXPCOMInitializedFlag)
#endif
{
#ifdef XPCOM_GLUE
// TODO: Need to be smarter about where exactly the xpcom library is.
XPCOMGlueStartup(nsnull);
#endif
// Initialise XPCOM
NS_InitXPCOM2(&sServiceManager, mozBinDirectory, appFileLocProvider);
@@ -172,5 +181,8 @@ nsresult NS_TermEmbedding()
NS_ShutdownXPCOM(sServiceManager);
#endif
#ifdef XPCOM_GLUE
XPCOMGlueShutdown();
#endif
return NS_OK;
}