Bug 1499164 - Properly handle locked startup page. r=Felipe
authorMichael Kaply <mozilla@kaply.com>
Mon, 15 Oct 2018 19:55:33 +0000
changeset 499777 70a5ef5872f895009bfdf2958616ca0ecece807f
parent 499776 0bf7bb3f9e581ee5da934136e404d794a130fddc
child 499778 b2593fa8b1bd907c0685dc2c5d6b9f266ab564c5
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe
bugs1499164
milestone64.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 1499164 - Properly handle locked startup page. r=Felipe Differential Revision: https://phabricator.services.mozilla.com/D8760
browser/components/preferences/in-content/main.js
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -769,21 +769,20 @@ var gMainPane = {
   updateBrowserStartupUI() {
     const pbAutoStartPref = Preferences.get("browser.privatebrowsing.autostart");
     const startupPref = Preferences.get("browser.startup.page");
 
     let newValue;
     let checkbox = document.getElementById("browserRestoreSession");
     if (pbAutoStartPref.value || startupPref.locked) {
       checkbox.setAttribute("disabled", "true");
-      newValue = false;
     } else {
       checkbox.removeAttribute("disabled");
-      newValue = startupPref.value === this.STARTUP_PREF_RESTORE_SESSION;
     }
+    newValue = pbAutoStartPref.value ? false : startupPref.value === this.STARTUP_PREF_RESTORE_SESSION;
     if (checkbox.checked !== newValue) {
       checkbox.checked = newValue;
     }
   },
 
   initBrowserLocale() {
     gMainPane.setBrowserLocales(Services.locale.requestedLocale);
   },