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:
Luca Greco 2016-07-06 16:18:58 +02:00
Родитель 61094e5a36
Коммит 7ce3851ef3
2 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -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();
};