don't leak all of the pres shells. bug 78510, r=jst/brendan

git-svn-id: svn://10.0.0.236/trunk@177537 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2005-08-11 03:59:04 +00:00
parent cfa8f92f51
commit 6dd6993f13

View File

@@ -1898,14 +1898,16 @@ PresShell::Destroy()
if (mHaveShutDown)
return NS_OK;
#ifdef MOZ_XUL
{
nsCOMPtr<nsIObserverService> os =
do_GetService("@mozilla.org/observer-service;1");
if (os)
if (os) {
os->RemoveObserver(this, NS_LINK_VISITED_EVENT_TOPIC);
#ifdef MOZ_XUL
os->RemoveObserver(this, "chrome-flush-skin-caches");
}
#endif
}
}
// If our paint suppression timer is still active, kill it.
if (mPaintSuppressionTimer) {