Backed out changeset 2d2938a3bee6 (bug 1533846) for bc failures at browser_asrouter_toolbarbadge.js. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Mon, 05 Aug 2019 14:40:08 +0300
changeset 486170 8c2b5b14ea21a5fa32ae4e072c6ac6239eca6347
parent 486169 8247f9a13f56cd11a11a8047905186cb2c36b97f
child 486171 87356d9276c51181c022c981eca992197a7b1c81
push id36391
push usermalexandru@mozilla.com
push dateMon, 05 Aug 2019 15:55:27 +0000
treeherdermozilla-central@9c91b33629b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1533846
milestone70.0a1
backs out2d2938a3bee655c0f6ff21c6c0df29d60574183b
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
Backed out changeset 2d2938a3bee6 (bug 1533846) for bc failures at browser_asrouter_toolbarbadge.js. CLOSED TREE
browser/components/newtab/lib/ToolbarBadgeHub.jsm
--- a/browser/components/newtab/lib/ToolbarBadgeHub.jsm
+++ b/browser/components/newtab/lib/ToolbarBadgeHub.jsm
@@ -46,17 +46,17 @@ ChromeUtils.defineModuleGetter(
 ChromeUtils.defineModuleGetter(
   this,
   "clearInterval",
   "resource://gre/modules/Timer.jsm"
 );
 
 // Frequency at which to check for new messages
 const SYSTEM_TICK_INTERVAL = 5 * 60 * 1000;
-let notificationsByWindow = new WeakMap();
+const notificationsByWindow = new WeakMap();
 
 class _ToolbarBadgeHub {
   constructor() {
     this.id = "toolbar-badge-hub";
     this.template = "toolbar_badge";
     this.state = null;
     this.prefs = {
       WHATSNEW_TOOLBAR_PANEL: "browser.messaging-system.whatsNewPanel.enabled",
@@ -208,17 +208,16 @@ class _ToolbarBadgeHub {
     }
     // Will call uninit on every window
     EveryWindow.unregisterCallback(this.id);
     if (this.state.notification) {
       this._blockMessageById(this.state.notification.id);
     }
     this._clearBadgeTimeout();
     this.state = {};
-    notificationsByWindow = new WeakMap();
   }
 
   removeToolbarNotification(toolbarButton) {
     // Remove it from the element that displays the badge
     toolbarButton
       .querySelector(".toolbarbutton-badge")
       .classList.remove("feature-callout");
     // Remove it from the toolbar icon
@@ -333,17 +332,16 @@ class _ToolbarBadgeHub {
       });
     }
   }
 
   uninit() {
     this._clearBadgeTimeout();
     clearInterval(this.state._intervalId);
     this.state = null;
-    notificationsByWindow = new WeakMap();
     Services.prefs.removeObserver(this.prefs.WHATSNEW_TOOLBAR_PANEL, this);
   }
 }
 
 this._ToolbarBadgeHub = _ToolbarBadgeHub;
 
 /**
  * ToolbarBadgeHub - singleton instance of _ToolbarBadgeHub that can initiate