mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1057155 - Stop error on remote runtime cancel. r=paul
This commit is contained in:
parent
a51594a4be
commit
e8934d56a0
@ -246,8 +246,11 @@ let UI = {
|
||||
this.unbusy();
|
||||
}, (e) => {
|
||||
this.cancelBusyTimeout();
|
||||
UI.reportError("error_operationFail", operationDescription);
|
||||
console.error(e);
|
||||
let operationCanceled = e && e.canceled;
|
||||
if (!operationCanceled) {
|
||||
UI.reportError("error_operationFail", operationDescription);
|
||||
console.error(e);
|
||||
}
|
||||
this.unbusy();
|
||||
});
|
||||
return promise;
|
||||
|
@ -337,7 +337,7 @@ exports.AppManager = AppManager = {
|
||||
try {
|
||||
this.selectedRuntime.connect(this.connection).then(
|
||||
() => {},
|
||||
() => {deferred.reject()});
|
||||
deferred.reject.bind(deferred));
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
deferred.reject();
|
||||
|
@ -126,11 +126,13 @@ let gRemoteRuntime = {
|
||||
return promise.reject();
|
||||
}
|
||||
let ret = {value: connection.host + ":" + connection.port};
|
||||
Services.prompt.prompt(win,
|
||||
Strings.GetStringFromName("remote_runtime_promptTitle"),
|
||||
Strings.GetStringFromName("remote_runtime_promptMessage"),
|
||||
ret, null, {});
|
||||
let title = Strings.GetStringFromName("remote_runtime_promptTitle");
|
||||
let message = Strings.GetStringFromName("remote_runtime_promptMessage");
|
||||
let ok = Services.prompt.prompt(win, title, message, ret, null, {});
|
||||
let [host,port] = ret.value.split(":");
|
||||
if (!ok) {
|
||||
return promise.reject({canceled: true});
|
||||
}
|
||||
if (!host || !port) {
|
||||
return promise.reject();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user