Bug 1062087 - Fix undefined variable error messages in Settings API; r=bent

This commit is contained in:
Kyle Machulis 2014-09-05 18:39:54 -07:00
parent a1b1f6f0ed
commit dd58fe3514
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ function SettingsLock(aSettingsManager) {
"Settings:Clear:OK", "Settings:Clear:KO",
"Settings:Set:OK", "Settings:Set:KO",
"Settings:Finalize:OK", "Settings:Finalize:KO"]);
this.sendMessage("Settings:CreateLock", {lockID: this._id, isInternalLock: false});
this.sendMessage("Settings:CreateLock", {lockID: this._id, isServiceLock: false});
Services.tm.currentThread.dispatch(this._closeHelper.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
}

View File

@ -601,7 +601,7 @@ let SettingsRequestManager = {
p.reject("Invalid operation: " + currentTask.operation);
}
p.then(function(ret) {
ret.task.defer.resolve(ret.results);
ret.task.defer.resolve("results" in ret ? ret.results : null);
}.bind(currentTask), function(ret) {
ret.task.defer.reject(ret.error);
});