Bug 1680211 - [devtools] Remove backward compatibility code to handle hidden system addons. r=jdescottes.

All addons have the hidden property now, so we can remove
the backward compatibility code and tidy up things a bit.

Differential Revision: https://phabricator.services.mozilla.com/D98466
This commit is contained in:
Nicolas Chevobbe 2020-12-03 06:24:21 +00:00
Родитель f211a1d986
Коммит 04874858ce
1 изменённых файлов: 7 добавлений и 7 удалений

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

@ -203,14 +203,14 @@ function requestExtensions() {
const addons = await clientWrapper.listAddons({
iconDataURL: isIconDataURLRequired,
});
let extensions = addons.filter(a => a.debuggable);
// Filter out hidden & system addons unless the dedicated preference is set to true.
if (!getState().ui.showHiddenAddons) {
// @backward-compat { version 67 } Older servers don't return the `hidden` property
// for System addons.
extensions = extensions.filter(e => !e.isSystem && !e.hidden);
}
const showHiddenAddons = getState().ui.showHiddenAddons;
// Filter out non-debuggable addons as well as hidden ones, unless the dedicated
// preference is set to true.
const extensions = addons.filter(
a => a.debuggable && (!a.hidden || showHiddenAddons)
);
const installedExtensions = extensions.filter(
e => !e.temporarilyInstalled