mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Bug 660568 nsImageFrame::IconLoad must call Preferences::RemoveObservers() r=roc
This commit is contained in:
parent
b1a2c45392
commit
22b9771448
@ -1892,6 +1892,20 @@ nsImageFrame::IconLoad::IconLoad()
|
||||
GetPrefs();
|
||||
}
|
||||
|
||||
void
|
||||
nsImageFrame::IconLoad::Shutdown()
|
||||
{
|
||||
Preferences::RemoveObservers(this, kIconLoadPrefs);
|
||||
// in case the pref service releases us later
|
||||
if (mLoadingImage) {
|
||||
mLoadingImage->CancelAndForgetObserver(NS_ERROR_FAILURE);
|
||||
mLoadingImage = nsnull;
|
||||
}
|
||||
if (mBrokenImage) {
|
||||
mBrokenImage->CancelAndForgetObserver(NS_ERROR_FAILURE);
|
||||
mBrokenImage = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsImageFrame::IconLoad::Observe(nsISupports *aSubject, const char* aTopic,
|
||||
|
@ -328,18 +328,7 @@ private:
|
||||
public:
|
||||
IconLoad();
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
// in case the pref service releases us later
|
||||
if (mLoadingImage) {
|
||||
mLoadingImage->CancelAndForgetObserver(NS_ERROR_FAILURE);
|
||||
mLoadingImage = nsnull;
|
||||
}
|
||||
if (mBrokenImage) {
|
||||
mBrokenImage->CancelAndForgetObserver(NS_ERROR_FAILURE);
|
||||
mBrokenImage = nsnull;
|
||||
}
|
||||
}
|
||||
void Shutdown();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
Loading…
x
Reference in New Issue
Block a user