From 0a2e3a9e8de2531a1c95aa5dd3454c9d18c0daba Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Mon, 10 Jan 2000 21:26:56 +0000 Subject: [PATCH] On Shutdown let servicemanager be available until the xpcom shutdown observers are notified. --- xpcom/build/nsXPComInit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp index ed79534c90e..70f1c1b29fa 100644 --- a/xpcom/build/nsXPComInit.cpp +++ b/xpcom/build/nsXPComInit.cpp @@ -501,7 +501,6 @@ nsresult NS_COM NS_InitXPCOM(nsIServiceManager* *result, nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr) { nsrefcnt cnt; - gShuttingDown = PR_TRUE; // Notify observers of xpcom shutting down nsresult rv = NS_OK; @@ -521,6 +520,11 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr) } } + // XPCOM is officially in shutdown mode NOW + // Set this only after the observers have been notified as this + // will cause servicemanager to become inaccessible. + gShuttingDown = PR_TRUE; + // Release our own singletons... XPTI_FreeInterfaceInfoManager();