Bug 1012957 - Save about:config changes immediately as made, r=wesj

This commit is contained in:
Mark Capella 2014-05-28 18:26:36 -04:00
Родитель 8a31c3dce6
Коммит e68c2d1338
1 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -157,6 +157,9 @@ var NewPrefDialog = {
break;
}
// Ensure pref adds flushed to disk immediately
Services.prefs.savePrefFile(null);
this.hide();
},
@ -217,9 +220,6 @@ var AboutConfig = {
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
@ -423,6 +423,9 @@ var AboutConfig = {
// Reset will handle any locked condition
let pref = this._getPrefForNode(node);
pref.reset();
// Ensure pref reset flushed to disk immediately
Services.prefs.savePrefFile(null);
},
// When we want to toggle a bool pref
@ -539,6 +542,9 @@ Pref.prototype = {
default:
Services.prefs.setCharPref(this.name, aPrefValue);
}
// Ensure pref change flushed to disk immediately
Services.prefs.savePrefFile(null);
},
get default() {