Bug 546502 - Refreshing on toolbar for crash plugin UI doesn't remove notification bar. r=gavin, a-1924=clegnitto GECKO1924_20100413_RELBRANCH
authorJustin Dolske <dolske@mozilla.com>
Wed, 19 May 2010 14:59:17 -0700
branchGECKO1924_20100413_RELBRANCH
changeset 34226 2de16fe1b3af35315d6001648cbc6fefb2021e0c
parent 34225 79121c00eebf28e1232db2b9359f8e6829541422
child 34235 0383745fc4de80848ec452876491ccbe63d8f906
push id1338
push userjdolske@mozilla.com
push dateWed, 19 May 2010 21:59:50 +0000
reviewersgavin
bugs546502
milestone1.9.2.4
Bug 546502 - Refreshing on toolbar for crash plugin UI doesn't remove notification bar. r=gavin, a-1924=clegnitto
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -6416,16 +6416,20 @@ var gMissingPluginInstaller = {
         learnMore = gNavigatorBundle.getString("crashedpluginsMessage.learnMore");
       } catch (e) {
         learnMore = "Learn More\u2026";
       }
       link.setAttribute("value", learnMore);
       link.href = gMissingPluginInstaller.crashReportHelpURL;
       let description = notification.ownerDocument.getAnonymousElementByAttribute(notification, "anonid", "messageText");
       description.appendChild(link);
+
+      // Remove the notfication when the page is reloaded.
+      doc.defaultView.top.addEventListener("unload", function() {
+        notificationBox.removeNotification(notification); }, false);
     }
 
   },
 
   refreshBrowser: function (aEvent) {
     // browser elements are anonymous so we can't just use target.
     var browser = aEvent.originalTarget;
     var notificationBox = gBrowser.getNotificationBox(browser);