From 3370809f6a4f9186f92904bdee43138182b7fd79 Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Tue, 10 Aug 1999 23:06:33 +0000 Subject: [PATCH] Logging error from canunload --- xpcom/components/nsComponentManager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp index 4fb33af78675..19b2395c40de 100644 --- a/xpcom/components/nsComponentManager.cpp +++ b/xpcom/components/nsComponentManager.cpp @@ -1765,7 +1765,12 @@ nsFreeLibrary(nsDll *dll, nsIServiceManager *serviceMgr) nsrefcnt objsAlive; PRBool canUnload; rv = mobj->CanUnload(serviceMgr, &canUnload, &objsAlive); - if (NS_FAILED(rv)) return rv; + if (NS_FAILED(rv)) + { + PR_LOG(nsComponentManagerLog, PR_LOG_ALWAYS, + ("nsComponentManager: nsIModule::CanUnload() returned error for %s.", dll->GetNativePath())); + return rv; + } if (canUnload) { @@ -2217,6 +2222,7 @@ nsComponentManagerImpl::SelfRegisterDll(nsDll *dll) PR_LOG(nsComponentManagerLog, PR_LOG_ERROR, ("nsComponentManager: dll->GetDllSpec() on %s FAILED.", dll->GetNativePath())); } + mobj = NULL; // Force a release of the Module object before unload() } #ifndef OBSOLETE_MODULE_LOADING else @@ -2267,6 +2273,7 @@ nsComponentManagerImpl::SelfUnregisterDll(nsDll *dll) PR_LOG(nsComponentManagerLog, PR_LOG_ERROR, ("nsComponentManager: dll->GetDllSpec() on %s FAILED.", dll->GetNativePath())); } + mobj = NULL; // Force a release of the Module object before unload() } #ifndef OBSOLETE_MODULE_LOADING else