mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-06 00:10:25 +00:00
ccarlen says we don't have to bump the refCnt when adding the observer.
This commit is contained in:
parent
ef1092aba4
commit
902c51c0bc
@ -546,12 +546,8 @@ nsNSSComponent::RegisterProfileChangeObserver()
|
||||
NS_OBSERVERSERVICE_CONTRACTID, &rv);
|
||||
NS_ASSERTION(observerService, "could not get observer service");
|
||||
if (observerService) {
|
||||
// Our refcnt must be > 0 when we call AddObserver or we'll
|
||||
// get deleted.
|
||||
++mRefCnt;
|
||||
observerService->AddObserver(this, PROFILE_BEFORE_CHANGE_TOPIC);
|
||||
observerService->AddObserver(this, PROFILE_AFTER_CHANGE_TOPIC);
|
||||
--mRefCnt;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user