mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1184397 - Release the observer service when the permission manager shuts down; r=jdm
This commit is contained in:
parent
5d2efab883
commit
923c6b9d49
@ -436,6 +436,7 @@ nsPermissionManager::Init()
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mObserverService->AddObserver(this, "profile-before-change", true);
|
||||
mObserverService->AddObserver(this, "profile-do-change", true);
|
||||
mObserverService->AddObserver(this, "xpcom-shutdown", true);
|
||||
}
|
||||
|
||||
if (IsChildProcess()) {
|
||||
@ -1494,10 +1495,11 @@ NS_IMETHODIMP nsPermissionManager::Observe(nsISupports *aSubject, const char *aT
|
||||
mIsShuttingDown = true;
|
||||
RemoveAllFromMemory();
|
||||
CloseDB(false);
|
||||
}
|
||||
else if (!nsCRT::strcmp(aTopic, "profile-do-change")) {
|
||||
} else if (!nsCRT::strcmp(aTopic, "profile-do-change")) {
|
||||
// the profile has already changed; init the db from the new location
|
||||
InitDB(false);
|
||||
} else if (!nsCRT::strcmp(aTopic, "xpcom-shutdown")) {
|
||||
mObserverService = nullptr;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user