Bug 728426 - Opening and then closing bookmarks sidebar keeps the bookmarksPanel.xul and/or history-panel.xul document alive; r=dao

This commit is contained in:
Tim Taubert 2012-07-21 19:37:56 +02:00
parent 859bc35349
commit 12b169c107
2 changed files with 9 additions and 2 deletions

View File

@ -4862,10 +4862,17 @@ function toggleSidebar(commandID, forceOpen) {
if (sidebarBroadcaster.getAttribute("checked") == "true") {
if (!forceOpen) {
// Replace the document currently displayed in the sidebar with about:blank
// so that we can free memory by unloading the page. We need to explicitly
// create a new content viewer because the old one doesn't get destroyed
// until about:blank has loaded (which does not happen as long as the
// element is hidden).
sidebar.setAttribute("src", "about:blank");
sidebar.docShell.createAboutBlankContentViewer(null);
sidebarBroadcaster.removeAttribute("checked");
sidebarBox.setAttribute("sidebarcommand", "");
sidebarTitle.value = "";
sidebar.setAttribute("src", "about:blank");
sidebarBox.hidden = true;
sidebarSplitter.hidden = true;
content.focus();

View File

@ -426,7 +426,7 @@ class ShutdownLeakLogger(object):
DOM windows (that are still around after test suite shutdown, despite running
the GC) to the tests that created them and prints leak statistics.
"""
MAX_LEAK_COUNT = 5
MAX_LEAK_COUNT = 3
def __init__(self, logger):
self.logger = logger