зеркало из https://github.com/mozilla/gecko-dev.git
Fixed bug in ReleaseServcie that was recreating the service manager during shutdown
This commit is contained in:
Родитель
4f9c341b0c
Коммит
a1f617e75c
|
@ -497,10 +497,14 @@ nsresult
|
|||
nsServiceManager::ReleaseService(const char* aProgID, nsISupports* service,
|
||||
nsIShutdownListener* shutdownListener)
|
||||
{
|
||||
nsIServiceManager* mgr;
|
||||
nsresult rv = GetGlobalServiceManager(&mgr);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
// Don't create the global service manager here because we might
|
||||
// be shutting down, and releasing all the services in its
|
||||
// destructor
|
||||
nsIServiceManager* mgr = mGlobalServiceManager;
|
||||
if (mgr) {
|
||||
return mgr->ReleaseService(aProgID, service, shutdownListener);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -515,8 +519,9 @@ nsServiceManager::RegisterService(const char* aProgID, nsISupports* aService)
|
|||
nsresult
|
||||
nsServiceManager::UnregisterService(const char* aProgID)
|
||||
{
|
||||
// Don't create the global service manager here because we might be shutting
|
||||
// down, and releasing all the services in its destructor
|
||||
// Don't create the global service manager here because we might
|
||||
// be shutting down, and releasing all the services in its
|
||||
// destructor
|
||||
if (mGlobalServiceManager)
|
||||
return mGlobalServiceManager->UnregisterService(aProgID);
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче