Bug 745744 - Geolocation doorhanger might cause zombie compartments because it keeps callbacks alive, r=gavin, a=desktop-only
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 18 Apr 2012 19:29:50 +0300
changeset 95202 218a9ef791519ddd2c3da28c6fed185de67009cc
parent 95201 23a0762a0dd6ab356bc180d35fda30af5fb55c24
child 95203 fe91ab23b390217aa67c1582829cee5ea877d6cd
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, desktop-only
bugs745744
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 745744 - Geolocation doorhanger might cause zombie compartments because it keeps callbacks alive, r=gavin, a=desktop-only
toolkit/content/PopupNotifications.jsm
--- a/toolkit/content/PopupNotifications.jsm
+++ b/toolkit/content/PopupNotifications.jsm
@@ -602,16 +602,19 @@ PopupNotifications.prototype = {
       if (notificationObj.options.removeOnDismissal)
         this._remove(notificationObj);
       else {
         notificationObj.dismissed = true;
         this._fireCallback(notificationObj, NOTIFICATION_EVENT_DISMISSED);
       }
     }, this);
 
+    while (this.panel.lastChild)
+      this.panel.removeChild(this.panel.lastChild);
+
     this._update();
   },
 
   _onButtonCommand: function PopupNotifications_onButtonCommand(event) {
     // Need to find the associated notification object, which is a bit tricky
     // since it isn't associated with the button directly - this is kind of
     // gross and very dependent on the structure of the popupnotification
     // binding's content.