Bug 827976 - Don't trigger the creation of the hidden window on non-Mac platforms from newInstall.js. r=Gijs
authorFelipe Gomes <felipc@gmail.com>
Mon, 04 Mar 2019 18:52:51 +0000
changeset 520348 8e41627afd1d
parent 520347 3a2cf44afaa3
child 520349 fd1095cf21af
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs827976
milestone67.0a1
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
Bug 827976 - Don't trigger the creation of the hidden window on non-Mac platforms from newInstall.js. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D21077
browser/base/content/newInstall.js
--- a/browser/base/content/newInstall.js
+++ b/browser/base/content/newInstall.js
@@ -12,25 +12,26 @@ function init() {
   if (navigator.platform == "MacIntel") {
     hideMenus();
     window.addEventListener("unload", showMenus);
   }
 }
 
 let gHidden = [];
 let gCollapsed = [];
-let hiddenDoc = Services.appShell.hiddenDOMWindow.document;
 
 function hideItem(id) {
+  let hiddenDoc = Services.appShell.hiddenDOMWindow.document;
   let element = hiddenDoc.getElementById(id);
   element.hidden = true;
   gHidden.push(element);
 }
 
 function collapseItem(id) {
+  let hiddenDoc = Services.appShell.hiddenDOMWindow.document;
   let element = hiddenDoc.getElementById(id);
   element.collapsed = true;
   gCollapsed.push(element);
 }
 
 function hideMenus() {
   hideItem("macDockMenuNewWindow");
   hideItem("macDockMenuNewPrivateWindow");