Bug 1541798 - Fix broken default theme check for early blank window. r=dao
authorMyk Melez <myk@mozilla.org>
Tue, 16 Apr 2019 15:38:52 +0000
changeset 469689 6d2077420c62
parent 469688 f93f4060ac7d
child 469690 ffe609cec2fe
push id35879
push usernerli@mozilla.com
push dateTue, 16 Apr 2019 22:01:48 +0000
treeherdermozilla-central@12a60898fdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1541798
milestone68.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 1541798 - Fix broken default theme check for early blank window. r=dao Differential Revision: https://phabricator.services.mozilla.com/D27537
browser/base/content/test/performance/browser_startup.js
browser/components/BrowserGlue.jsm
--- a/browser/base/content/test/performance/browser_startup.js
+++ b/browser/base/content/test/performance/browser_startup.js
@@ -111,16 +111,22 @@ const startupPhases = {
     modules: new Set([
       "resource://gre/modules/AsyncPrefs.jsm",
       "resource://gre/modules/LoginManagerContextMenu.jsm",
       "resource://pdf.js/PdfStreamConverter.jsm",
     ]),
   }},
 };
 
+if (Services.prefs.getBoolPref("browser.startup.blankWindow") &&
+    Services.prefs.getCharPref("extensions.activeThemeID", "default-theme@mozilla.org") ==
+      "default-theme@mozilla.org") {
+  startupPhases["before profile selection"].whitelist.modules.add("resource://gre/modules/XULStore.jsm");
+}
+
 if (!gBrowser.selectedBrowser.isRemoteBrowser) {
   // With e10s disabled, Places and BrowserWindowTracker.jsm (from a
   // SessionSaver.jsm timer) intermittently get loaded earlier. Likely
   // due to messages from the 'content' process arriving synchronously
   // instead of crossing a process boundary.
   info("merging the 'before handling user events' blacklist into the " +
        "'before first paint' one when e10s is disabled.");
   let from = startupPhases["before handling user events"].blacklist;
--- a/browser/components/BrowserGlue.jsm
+++ b/browser/components/BrowserGlue.jsm
@@ -299,17 +299,17 @@ let ACTORS = {
 };
 
 (function earlyBlankFirstPaint() {
   if (!Services.prefs.getBoolPref("browser.startup.blankWindow", false))
     return;
 
   // Until bug 1450626 and bug 1488384 are fixed, skip the blank window when
   // using a non-default theme.
-  if (Services.prefs.getCharPref("extensions.activeThemeID", "") !=
+  if (Services.prefs.getCharPref("extensions.activeThemeID", "default-theme@mozilla.org") !=
         "default-theme@mozilla.org")
     return;
 
   let store = Services.xulStore;
   let getValue = attr =>
     store.getValue(AppConstants.BROWSER_CHROME_URL, "main-window", attr);
   let width = getValue("width");
   let height = getValue("height");