Merge pull request #4225 from Snuffleupagus/prefs-v3

Improve handling of preferences in Firefox
This commit is contained in:
Brendan Dahl 2014-03-10 10:39:56 -07:00
commit 48323b8066
5 changed files with 118 additions and 62 deletions

View file

@ -108,9 +108,10 @@ Preferences.prototype.writeToStorage = function(prefObj) {
FirefoxCom.requestSync('setPreferences', prefObj);
};
Preferences.prototype.readFromStorage = function() {
Preferences.prototype.readFromStorage = function(prefObj) {
var readFromStoragePromise = new Promise(function (resolve) {
var readPrefs = JSON.parse(FirefoxCom.requestSync('getPreferences'));
var readPrefs = JSON.parse(FirefoxCom.requestSync('getPreferences',
prefObj));
resolve(readPrefs);
});
return readFromStoragePromise;