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 91889 218a9ef791519ddd2c3da28c6fed185de67009cc
parent 91888 23a0762a0dd6ab356bc180d35fda30af5fb55c24
child 91890 fe91ab23b390217aa67c1582829cee5ea877d6cd
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgavin, desktop-only
bugs745744
milestone14.0a1
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.