Bug 992363 - Fix a few uncaught async errors in services. r=rnewman

This commit is contained in:
David Rajchenbach-Teller 2014-04-07 10:33:56 -04:00
parent 4fea4dbd6a
commit 047732cf2f
2 changed files with 6 additions and 2 deletions

View File

@ -932,7 +932,7 @@ this.DataReportingPolicy.prototype = Object.freeze({
let deferred = Promise.defer();
deferred.promise.then(onComplete, function onError(error) {
deferred.promise.then(onComplete, (error) => {
this._log.warn("Data policy notification presentation failed: " +
CommonUtils.exceptionStr(error));
});
@ -1015,7 +1015,7 @@ this.DataReportingPolicy.prototype = Object.freeze({
let onError = function onError(error) {
this._log.error("Error when handling data submission result: " +
CommonUtils.exceptionStr(result));
CommonUtils.exceptionStr(error));
this._inProgressSubmissionRequest = null;
this._handleSubmissionFailure();
}.bind(this);

View File

@ -183,6 +183,10 @@ this.BrowserIDManager.prototype = {
// Reset the world before we do anything async.
this.whenReadyToAuthenticate = Promise.defer();
this.whenReadyToAuthenticate.promise.then(null, (err) => {
this._log.error("Could not authenticate: " + err);
});
this._shouldHaveSyncKeyBundle = false;
this._authFailureReason = null;