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

This commit is contained in:
bryner%brianryner.com 2005-08-11 03:59:04 +00:00
Родитель b3f31d48d4
Коммит b2e4656151
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

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