From f99dbbbc26531b8efbd8225c3a9ed01c986cce7e Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Mon, 10 Sep 2001 04:28:37 +0000 Subject: [PATCH] fixes 98735. r=adamlock, sr=rpotts. Basic problem is that the first argument of NS_InitXPCOM2 was not returning an nsIServiceManager --- xpcom/build/nsXPComInit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp index da06812143c..fb343aaea67 100644 --- a/xpcom/build/nsXPComInit.cpp +++ b/xpcom/build/nsXPComInit.cpp @@ -178,7 +178,6 @@ extern PRBool gShuttingDown; static nsModuleComponentInfo components[] = { COMPONENT(MEMORY, nsMemoryImpl::Create), - #define NS_ERRORSERVICE_CLASSNAME NS_ERRORSERVICE_NAME COMPONENT(ERRORSERVICE, nsErrorService::Create), @@ -341,6 +340,10 @@ nsresult NS_COM NS_InitXPCOM2(nsIServiceManager* *result, gServiceManager = NS_STATIC_CAST(nsIServiceManager*, compMgr); nsComponentManagerImpl::gComponentManager = compMgr; + + if (result) { + NS_ADDREF(*result = gServiceManager); + } } nsCOMPtr memory = getter_AddRefs(nsMemory::GetGlobalMemoryService());