зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1680211 - [devtools] Remove uninstallUnsupportedExtensions function. r=jdescottes.
The function was taking care of removing old addons. It landed 2 years ago, so we can assume that we don't need that anymore. Differential Revision: https://phabricator.services.mozilla.com/D98465
This commit is contained in:
Родитель
767dc27ef8
Коммит
f211a1d986
|
@ -130,9 +130,6 @@ const AboutDebugging = {
|
|||
adbProcess.on("adb-ready", this.onAdbProcessReady);
|
||||
// get the initial status of adb process, in case it's already started
|
||||
this.onAdbProcessReady();
|
||||
|
||||
// Remove deprecated remote debugging extensions.
|
||||
await adbAddon.uninstallUnsupportedExtensions();
|
||||
},
|
||||
|
||||
onAdbAddonUpdated() {
|
||||
|
|
|
@ -11,12 +11,6 @@ const EventEmitter = require("devtools/shared/event-emitter");
|
|||
const PREF_ADB_EXTENSION_URL = "devtools.remote.adb.extensionURL";
|
||||
const PREF_ADB_EXTENSION_ID = "devtools.remote.adb.extensionID";
|
||||
|
||||
// @backward-compat { version 63 } Extension ID for adb helper extension that might be
|
||||
// installed on older versions.
|
||||
const ADB_HELPER_ADDON_ID = "adbhelper@mozilla.org";
|
||||
// Extension ID for Valence extension that is no longer supported.
|
||||
const VALENCE_ADDON_ID = "fxdevtools-adapters@mozilla.org";
|
||||
|
||||
const ADB_ADDON_STATES = {
|
||||
DOWNLOADING: "downloading",
|
||||
INSTALLED: "installed",
|
||||
|
@ -133,25 +127,6 @@ class ADBAddon extends EventEmitter {
|
|||
addon.uninstall();
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup old remote debugging extensions from profiles that might still have them
|
||||
* installed. Should be called from remote debugging entry points.
|
||||
*/
|
||||
async uninstallUnsupportedExtensions() {
|
||||
const [adbHelperAddon, valenceAddon] = await Promise.all([
|
||||
AddonManager.getAddonByID(ADB_HELPER_ADDON_ID),
|
||||
AddonManager.getAddonByID(VALENCE_ADDON_ID),
|
||||
]);
|
||||
|
||||
if (adbHelperAddon) {
|
||||
adbHelperAddon.uninstall();
|
||||
}
|
||||
|
||||
if (valenceAddon) {
|
||||
valenceAddon.uninstall();
|
||||
}
|
||||
}
|
||||
|
||||
installFailureHandler(install, message) {
|
||||
this.status = ADB_ADDON_STATES.UNINSTALLED;
|
||||
this.emit("failure", message);
|
||||
|
|
Загрузка…
Ссылка в новой задаче