mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 778027 - [Settings API] addObserver & onsettingchange quirks. r=sicking
This commit is contained in:
parent
dd2820f364
commit
ce0aa8bd3f
@ -268,11 +268,9 @@ SettingsManager.prototype = {
|
||||
}
|
||||
if (this._callbacks && this._callbacks[msg.key]) {
|
||||
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) {
|
||||
cb({settingName: msg.key, settingValue: msg.value});
|
||||
});
|
||||
}
|
||||
this._callbacks[msg.key].forEach(function(cb) {
|
||||
cb({settingName: msg.key, settingValue: msg.value});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
debug("no observers stored!");
|
||||
|
Loading…
Reference in New Issue
Block a user