Fixing leak regression from bug 200632 landing (the latest cookie rewrite).
This changes the nsCookieService singleton fu to AddRef only once, rather than twice (and removes the corresponding Release in the module dtor). The double-addref was making the cookie module stick around until XPCOM starts shutting down modules, which is too late to release things we own (observer service, prefbranch, etc). So we were violating XPCOM shutdown rules without knowing it. So, the tracemalloc leak stats on Brad should halve. :) b=209571, r=alecf, sr=darin. git-svn-id: svn://10.0.0.236/trunk@144084 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -139,11 +139,4 @@ static const nsModuleComponentInfo components[] = {
|
||||
},
|
||||
};
|
||||
|
||||
PR_STATIC_CALLBACK(void)
|
||||
cookieModuleDtor(nsIModule *aSelf)
|
||||
{
|
||||
// Release our singletons
|
||||
nsCookieService::FreeSingleton();
|
||||
}
|
||||
|
||||
NS_IMPL_NSGETMODULE_WITH_DTOR(nsCookieModule, components, cookieModuleDtor)
|
||||
NS_IMPL_NSGETMODULE(nsCookieModule, components)
|
||||
|
||||
Reference in New Issue
Block a user