зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1531838 - Ensure we don't set up twice on any window. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D26701 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0ba1f6de8b
Коммит
3b06eee462
|
@ -241,13 +241,18 @@ this.FirefoxMonitor = {
|
|||
EveryWindow.registerCallback(
|
||||
this.kNotificationID,
|
||||
(win) => {
|
||||
if (this.notificationsByWindow.has(win)) {
|
||||
// We've already set up this window.
|
||||
return;
|
||||
}
|
||||
|
||||
this.notificationsByWindow.set(win, new Set());
|
||||
|
||||
// Inject our stylesheet.
|
||||
let DOMWindowUtils = win.windowUtils;
|
||||
DOMWindowUtils.loadSheetUsingURIString(this.getURL("privileged/FirefoxMonitor.css"),
|
||||
DOMWindowUtils.AUTHOR_SHEET);
|
||||
|
||||
this.notificationsByWindow.set(win, new Set());
|
||||
|
||||
// Setup the popup notification stuff. First, the URL bar icon:
|
||||
let doc = win.document;
|
||||
let notificationBox = doc.getElementById("notification-popup-box");
|
||||
|
|
Загрузка…
Ссылка в новой задаче