From a3d8bb7cdcc3350daffd794053404271d493b131 Mon Sep 17 00:00:00 2001 From: "martijn.martijn%gmail.com" Date: Wed, 6 Sep 2006 19:33:28 +0000 Subject: [PATCH] Bug 344872 - Mail window is leaking folderObserver on shutdown, patch by Adam Guthrie, r=bienvenu git-svn-id: svn://10.0.0.236/trunk@209285 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/content/msgMail3PaneWindow.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozilla/mail/base/content/msgMail3PaneWindow.js b/mozilla/mail/base/content/msgMail3PaneWindow.js index 55e1c4c1d09..76a1ccc70ca 100644 --- a/mozilla/mail/base/content/msgMail3PaneWindow.js +++ b/mozilla/mail/base/content/msgMail3PaneWindow.js @@ -899,6 +899,8 @@ function OnUnloadMessenger() // FIX ME - later we will be able to use onload from the overlay OnUnloadMsgHeaderPane(); + OnUnloadFolderPane(); + OnMailWindowUnload(); } @@ -1178,6 +1180,12 @@ function OnLoadFolderPane() folderTree.addEventListener("mousedown",TreeOnMouseDown,true); } +function OnUnloadFolderPane() +{ + var folderTreeBuilder = GetFolderTree().builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder); + folderTreeBuilder.removeObserver(folderObserver); +} + // builds prior to 12-08-2001 did not have the labels column // in the thread pane. so if a user ran an old build, and then // upgraded, they get the new column, and this causes problems.