mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1533846 - Clear WeakMap entries for Messaging System notifications r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D40432 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
577c3ffca3
commit
2255219c63
@ -51,7 +51,7 @@ ChromeUtils.defineModuleGetter(
|
||||
|
||||
// Frequency at which to check for new messages
|
||||
const SYSTEM_TICK_INTERVAL = 5 * 60 * 1000;
|
||||
const notificationsByWindow = new WeakMap();
|
||||
let notificationsByWindow = new WeakMap();
|
||||
|
||||
class _ToolbarBadgeHub {
|
||||
constructor() {
|
||||
@ -213,6 +213,7 @@ class _ToolbarBadgeHub {
|
||||
}
|
||||
this._clearBadgeTimeout();
|
||||
this.state = {};
|
||||
notificationsByWindow = new WeakMap();
|
||||
}
|
||||
|
||||
removeToolbarNotification(toolbarButton) {
|
||||
@ -337,6 +338,7 @@ class _ToolbarBadgeHub {
|
||||
this._clearBadgeTimeout();
|
||||
clearInterval(this.state._intervalId);
|
||||
this.state = null;
|
||||
notificationsByWindow = new WeakMap();
|
||||
Services.prefs.removeObserver(this.prefs.WHATSNEW_TOOLBAR_PANEL, this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user