зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1268773 - Update the Addon Wrapper for cached addon actors on reload. r=ochameau
MozReview-Commit-ID: AWNPTyIuzCX --HG-- extra : rebase_source : c736731c2daa322dda16eca9ce8afbdba6ea1bb6
This commit is contained in:
Родитель
61094e5a36
Коммит
7ce3851ef3
|
@ -110,6 +110,15 @@ BrowserAddonActor.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
onInstalled: function BAA_updateAddonWrapper(aAddon) {
|
||||
if (aAddon.id != this._addon.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the AddonManager's addon object on reload/update.
|
||||
this._addon = aAddon;
|
||||
},
|
||||
|
||||
onDisabled: function BAA_onDisabled(aAddon) {
|
||||
if (aAddon != this._addon) {
|
||||
return;
|
||||
|
|
|
@ -2293,11 +2293,6 @@ Object.defineProperty(BrowserAddonList.prototype, "onListChanged", {
|
|||
});
|
||||
|
||||
BrowserAddonList.prototype.onInstalled = function (addon) {
|
||||
if (this._actorByAddonId.get(addon.id)) {
|
||||
// When an add-on gets upgraded or reloaded, it will not be uninstalled
|
||||
// so this step is necessary to clear the cache.
|
||||
this._actorByAddonId.delete(addon.id);
|
||||
}
|
||||
this._notifyListChanged();
|
||||
this._adjustListener();
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче