Add shutdown code for the macBrowserOverlay so that we remove gSanitizeListener as a pref observer. b=342600 r=mano

This commit is contained in:
dbaron@dbaron.org 2007-08-31 10:08:03 -07:00
parent 5518da3f51
commit 85ad7bd42b
2 changed files with 10 additions and 2 deletions

View File

@ -1223,8 +1223,9 @@ function BrowserShutdown()
}
#ifdef XP_MACOSX
// nonBrowserWindowStartup() and nonBrowserWindowDelayedStartup() are used for
// non-browser windows in macBrowserOverlay
// nonBrowserWindowStartup(), nonBrowserWindowDelayedStartup(), and
// nonBrowserWindowShutdown() are used for non-browser windows in
// macBrowserOverlay
function nonBrowserWindowStartup()
{
// Disable inappropriate commands / submenus
@ -1273,6 +1274,12 @@ function nonBrowserWindowDelayedStartup()
// Set up Sanitize Item
gSanitizeListener = new SanitizeListener();
}
function nonBrowserWindowShutdown()
{
if (gSanitizeListener)
gSanitizeListener.shutdown();
}
#endif
function AutoHideTabbarPrefListener()

View File

@ -62,6 +62,7 @@
<script type="application/x-javascript">
addEventListener("load", nonBrowserWindowStartup, false);
addEventListener("unload", nonBrowserWindowShutdown, false);
</script>
# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the