Bug 997332 - Changing prefs in about:config often doesn't get saved, r=wesj
authorMark Capella <markcapella@twcny.rr.com>
Wed, 23 Apr 2014 08:23:42 -0400
changeset 180170 7bd04d2f29844200251a852ad7e9cfcc443746c3
parent 180169 dd60c3189c8a996a62368628db55206b01c986cd
child 180171 3d7485d2bb5cf5c6ce5a84161128569ffe514a15
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewerswesj
bugs997332
milestone31.0a1
Bug 997332 - Changing prefs in about:config often doesn't get saved, r=wesj
mobile/android/chrome/content/config.js
--- a/mobile/android/chrome/content/config.js
+++ b/mobile/android/chrome/content/config.js
@@ -212,16 +212,19 @@ var AboutConfig = {
     // Setup the prefs observers
     Services.prefs.addObserver("", this, false);
   },
 
   // Uninit the main AboutConfig dialog
   uninit: function AC_uninit() {
     // Remove the prefs observer
     Services.prefs.removeObserver("", this);
+
+    // Ensure pref adds/changes/resets flushed to disk on unload
+    Services.prefs.savePrefFile(null);
   },
 
   // Clear the filterInput value, to display the entire list
   clearFilterInput: function AC_clearFilterInput() {
     this.filterInput.value = "";
     this.bufferFilterInput();
   },