Bug 1492352 Avoid keeping xpis open after an update to a disabled webextension r=kmag

--HG--
extra : rebase_source : a16a016cb1c5e9b5d188c9fdfc13a09b344b5ab6
This commit is contained in:
Andrew Swan 2018-09-18 19:20:17 -07:00
parent 18859e6634
commit 8d649d392e
3 changed files with 6 additions and 2 deletions

View File

@ -1206,7 +1206,7 @@ class BootstrapScope {
}
update(data, reason) {
Management.emit("update", {id: data.id, resourceURI: data.resourceURI});
return Management.emit("update", {id: data.id, resourceURI: data.resourceURI});
}
startup(data, reason) {

View File

@ -1797,6 +1797,10 @@ class AddonInstall {
if (this.existingAddon) {
await XPIInternal.BootstrapScope.get(this.existingAddon).update(
this.addon, !this.addon.disabled, install);
if (this.addon.disabled) {
flushJarCache(this.file);
}
} else {
await install();
await XPIInternal.BootstrapScope.get(this.addon).install(undefined, true);

View File

@ -1768,7 +1768,7 @@ class BootstrapScope {
async _install(reason, callUpdate, startup, extraArgs) {
if (callUpdate) {
this.callBootstrapMethod("update", reason, extraArgs);
await this.callBootstrapMethod("update", reason, extraArgs);
} else {
this.callBootstrapMethod("install", reason, extraArgs);
}