mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Releasing servMgr if one is passed in to match NS_InitXPCOM()
This commit is contained in:
parent
54e572a820
commit
96c1197169
@ -435,7 +435,11 @@ nsresult NS_COM NS_InitXPCOM(nsIServiceManager* *result,
|
||||
nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr)
|
||||
{
|
||||
nsrefcnt cnt;
|
||||
NS_RELEASE2(nsServiceManager::mGlobalServiceManager, cnt);
|
||||
|
||||
// We may have AddRef'd for the caller of NS_InitXPCOM, so release it
|
||||
// here again:
|
||||
NS_IF_RELEASE(servMgr);
|
||||
NS_RELEASE2(nsServiceManager::mGlobalServiceManager, cnt);
|
||||
NS_ASSERTION(cnt == 0, "Service Manager being held past XPCOM shutdown.");
|
||||
|
||||
// Finally, release the component manager last because it unloads the
|
||||
|
Loading…
Reference in New Issue
Block a user