mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1024812 - unhandled exceptions in hawkclient no longer cause sync to hang. r=rnewman
This commit is contained in:
parent
d6d311b723
commit
7032821a5a
@ -188,7 +188,7 @@ this.HawkClient.prototype = {
|
||||
let uri = this.host + path;
|
||||
let self = this;
|
||||
|
||||
function onComplete(error) {
|
||||
function _onComplete(error) {
|
||||
let restResponse = this.response;
|
||||
let status = restResponse.status;
|
||||
|
||||
@ -243,6 +243,18 @@ this.HawkClient.prototype = {
|
||||
deferred.resolve(this.response.body);
|
||||
};
|
||||
|
||||
function onComplete(error) {
|
||||
try {
|
||||
// |this| is the RESTRequest object and we need to ensure _onComplete
|
||||
// gets the same one.
|
||||
_onComplete.call(this, error);
|
||||
} catch (ex) {
|
||||
log.error("Unhandled exception processing response:" +
|
||||
CommonUtils.exceptionStr(ex));
|
||||
deferred.reject(ex);
|
||||
}
|
||||
}
|
||||
|
||||
let extra = {
|
||||
now: this.now(),
|
||||
localtimeOffsetMsec: this.localtimeOffsetMsec,
|
||||
|
Loading…
Reference in New Issue
Block a user