Bug 493527 - Directly change the remember-history pref through the preference element since setting it through the checkbox required multiple attempts. r=jaws
authormaxim <maxim@cliqz.com>
Thu, 23 Mar 2017 14:15:33 -0400
changeset 349253 0ab9adff3faf
parent 349252 88542bb64b97
child 349254 4a98ffe94e12
push id31547
push userkwierso@gmail.com
push dateThu, 23 Mar 2017 23:05:46 +0000
treeherdermozilla-central@65a83a84898e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs493527
milestone55.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 493527 - Directly change the remember-history pref through the preference element since setting it through the checkbox required multiple attempts. r=jaws This looks to be happening because the binding for the checkbox may get torn down too fast when a restart is required. MozReview-Commit-ID: 1y68jMubATx
browser/components/preferences/in-content-old/privacy.js
browser/components/preferences/in-content/privacy.js
--- a/browser/components/preferences/in-content-old/privacy.js
+++ b/browser/components/preferences/in-content-old/privacy.js
@@ -326,19 +326,17 @@ var gPrivacyPane = {
   updateHistoryModePrefs() {
     let pref = document.getElementById("browser.privatebrowsing.autostart");
     switch (document.getElementById("historyMode").value) {
     case "remember":
       if (pref.value)
         pref.value = false;
 
       // select the remember history option if needed
-      let rememberHistoryCheckbox = document.getElementById("rememberHistory");
-      if (!rememberHistoryCheckbox.checked)
-        rememberHistoryCheckbox.checked = true;
+      document.getElementById("places.history.enabled").value = true;
 
       // select the remember forms history option
       document.getElementById("browser.formfill.enable").value = true;
 
       // select the allow cookies option
       document.getElementById("network.cookie.cookieBehavior").value = 0;
       // select the cookie lifetime policy option
       document.getElementById("network.cookie.lifetimePolicy").value = 0;
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -326,19 +326,17 @@ var gPrivacyPane = {
   updateHistoryModePrefs() {
     let pref = document.getElementById("browser.privatebrowsing.autostart");
     switch (document.getElementById("historyMode").value) {
     case "remember":
       if (pref.value)
         pref.value = false;
 
       // select the remember history option if needed
-      let rememberHistoryCheckbox = document.getElementById("rememberHistory");
-      if (!rememberHistoryCheckbox.checked)
-        rememberHistoryCheckbox.checked = true;
+      document.getElementById("places.history.enabled").value = true;
 
       // select the remember forms history option
       document.getElementById("browser.formfill.enable").value = true;
 
       // select the allow cookies option
       document.getElementById("network.cookie.cookieBehavior").value = 0;
       // select the cookie lifetime policy option
       document.getElementById("network.cookie.lifetimePolicy").value = 0;