From 6dd6993f137f4b6d8bfd6e30d0942282b6d60c85 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Thu, 11 Aug 2005 03:59:04 +0000 Subject: [PATCH] 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 --- mozilla/layout/base/nsPresShell.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index b149604c292..af1a5f3fec7 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -1898,14 +1898,16 @@ PresShell::Destroy() if (mHaveShutDown) return NS_OK; -#ifdef MOZ_XUL { nsCOMPtr 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) {