Bug 745744 - Geolocation doorhanger might cause zombie compartments because it keeps callbacks alive, r=gavin, a=lsblakk
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sat, 21 Apr 2012 15:05:06 +0300
changeset 90749 6f27de794daabec5ccf960e13b88e8be0f82b47b
parent 90748 4e83943e6c69adc295b46c241fd64f88534bb453
child 90750 5baf8061c697c33f6a22ff4eb71837587ab3c01f
push id1116
push useropettay@mozilla.com
push dateSat, 21 Apr 2012 12:09:42 +0000
treeherdermozilla-aurora@6f27de794daa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, lsblakk
bugs745744
milestone13.0a2
Bug 745744 - Geolocation doorhanger might cause zombie compartments because it keeps callbacks alive, r=gavin, a=lsblakk
toolkit/content/PopupNotifications.jsm
--- a/toolkit/content/PopupNotifications.jsm
+++ b/toolkit/content/PopupNotifications.jsm
@@ -568,16 +568,19 @@ PopupNotifications.prototype = {
       if (notificationObj.options.removeOnDismissal)
         this._remove(notificationObj);
       else {
         notificationObj.dismissed = true;
         this._fireCallback(notificationObj, "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.