mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
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:
parent
7e4bfc3692
commit
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;
|
||||
|
Loading…
Reference in New Issue
Block a user