Bug 778027 - [Settings API] addObserver & onsettingchange quirks. r=sicking

This commit is contained in:
Gregor Wagner 2012-07-30 13:52:51 -07:00
parent 434b0c7e1d
commit 79683fb15e

View File

@ -268,11 +268,9 @@ SettingsManager.prototype = {
} }
if (this._callbacks && this._callbacks[msg.key]) { if (this._callbacks && this._callbacks[msg.key]) {
debug("observe callback called! " + msg.key + " " + this._callbacks[msg.key].length); debug("observe callback called! " + msg.key + " " + this._callbacks[msg.key].length);
for (let cb in this._callbacks[msg.key]) { this._callbacks[msg.key].forEach(function(cb) {
this._callbacks[msg.key].forEach(function(cb) { cb({settingName: msg.key, settingValue: msg.value});
cb({settingName: msg.key, settingValue: msg.value}); });
});
}
} }
} else { } else {
debug("no observers stored!"); debug("no observers stored!");