Bug 1070223: Ignore exceptions thrown from nsIBrowserSearchInitObserver. r=MattN

This commit is contained in:
Dave Townsend 2014-09-19 16:04:41 -07:00
parent 4938e93b4a
commit d08f93d549

View File

@ -3871,10 +3871,14 @@ SearchService.prototype = {
if (observer) {
this._initObservers.promise.then(
function onSuccess() {
observer.onInitComplete(self._initRV);
try {
observer.onInitComplete(self._initRV);
} catch (e) {
Cu.reportError(e);
}
},
function onError(aReason) {
Components.utils.reportError("Internal error while initializing SearchService: " + aReason);
Cu.reportError("Internal error while initializing SearchService: " + aReason);
observer.onInitComplete(Components.results.NS_ERROR_UNEXPECTED);
}
);