зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1868249 - Allow pending gecko results to be resolves when canceling an add-on installation. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D196353
This commit is contained in:
Родитель
7e4bfc3692
Коммит
26dd94a024
|
@ -424,8 +424,15 @@ class ExtensionInstallListener {
|
|||
try {
|
||||
this.install.cancel();
|
||||
cancelled = true;
|
||||
} catch (_) {
|
||||
} catch (ex) {
|
||||
// install may have already failed or been cancelled
|
||||
debug`Unable to cancel the install installId ${installId}, Error: ${ex}`;
|
||||
// When we attempt to cancel an install but the cancellation fails for
|
||||
// some reasons (e.g., because it is too late), we need to revert this
|
||||
// boolean property to allow another cancellation to be possible.
|
||||
// Otherwise, events like `onDownloadCancelled` won't resolve and that
|
||||
// will cause problems in the embedder.
|
||||
this.cancelling = false;
|
||||
}
|
||||
aCallback.onSuccess({ cancelled });
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче