From 2c25ccefa83bd2af7f916367d052f72fcb6e5ca7 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Wed, 24 May 2006 02:27:14 +0000 Subject: [PATCH] Bug 337029: bookmark properties dialog leaks a microsummaryObserver when canceled, patch by Regis Caspar , r=annie, r=mconnor git-svn-id: svn://10.0.0.236/trunk@198298 18797224-902f-48f8-a5cc-f745e15eee43 --- .../browser/components/places/content/bookmarkProperties.js | 6 ++++++ .../components/places/content/bookmarkProperties.xul | 1 + 2 files changed, 7 insertions(+) diff --git a/mozilla/browser/components/places/content/bookmarkProperties.js b/mozilla/browser/components/places/content/bookmarkProperties.js index 812d0d716f5..0c683d5aee2 100755 --- a/mozilla/browser/components/places/content/bookmarkProperties.js +++ b/mozilla/browser/components/places/content/bookmarkProperties.js @@ -652,6 +652,12 @@ var BookmarkPropertiesPanel = { this._saveChanges(); this._hideBookmarkProperties(); }, + + dialogCancel: function BPP_dialogCancel() { + if (this._isMicrosummaryVisible() && this._microsummaries) + this._microsummaries.removeObserver(this._microsummaryObserver); + this._hideBookmarkProperties(); + }, /** * This method deletes the bookmark corresponding to the URI stored diff --git a/mozilla/browser/components/places/content/bookmarkProperties.xul b/mozilla/browser/components/places/content/bookmarkProperties.xul index 6f6bd14811f..725a5175bbb 100755 --- a/mozilla/browser/components/places/content/bookmarkProperties.xul +++ b/mozilla/browser/components/places/content/bookmarkProperties.xul @@ -17,6 +17,7 @@ buttons="accept, cancel, extra1" buttonlabelextra1="&cmd.delete_bookmark.label;" ondialogaccept="BookmarkPropertiesPanel.dialogDone();" + ondialogcancel="BookmarkPropertiesPanel.dialogCancel();" ondialogextra1="BookmarkPropertiesPanel.dialogDeleteBookmark();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="BookmarkPropertiesPanel.init(window, window.arguments[0], window.arguments[1], window.arguments[2]);">