Backed out 3 changesets (bug 1494549) for multiple failures e.g.: devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_sidebar_usb_status.js CLOSED TREE
authorMargareta Eliza Balazs <ebalazs@mozilla.com>
Wed, 17 Oct 2018 11:52:14 +0300
changeset 497396 3895062d9e1d37a494a32e035b09ffea13c4fa57
parent 497395 5052e690160474c2fab0f3f238bac54f5bb2d263
child 497397 41a19ac5f495117bd9cfbb0dc7e8e3fbe6f17c13
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1494549
milestone64.0a1
backs out5729da1055e8a464e9d062a71084e3983033721a
7c62247314d7faf9ae14362f920e12e62fef8610
bff7126ddd3fbe19e3468b4c6896b45cf636582e
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 3 changesets (bug 1494549) for multiple failures e.g.: devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_sidebar_usb_status.js CLOSED TREE Backed out changeset 5729da1055e8 (bug 1494549) Backed out changeset 7c62247314d7 (bug 1494549) Backed out changeset bff7126ddd3f (bug 1494549)
devtools/client/aboutdebugging-new/aboutdebugging.js
devtools/client/aboutdebugging-new/src/actions/ui.js
devtools/client/aboutdebugging-new/src/components/App.js
devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css
devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js
devtools/client/aboutdebugging-new/src/constants.js
devtools/client/aboutdebugging-new/src/reducers/ui-state.js
devtools/client/aboutdebugging-new/test/browser/browser.ini
devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_sidebar_usb_status.js
devtools/client/aboutdebugging-new/test/browser/resources/test-adb-extension/adb-extension-linux.xpi
devtools/client/aboutdebugging-new/test/browser/resources/test-adb-extension/adb-extension-linux64.xpi
devtools/client/aboutdebugging-new/test/browser/resources/test-adb-extension/adb-extension-mac64.xpi
devtools/client/aboutdebugging-new/test/browser/resources/test-adb-extension/adb-extension-win32.xpi
devtools/client/aboutdebugging-new/tmp-locale/en-US/aboutdebugging.notftl
devtools/shared/adb/adb-addon.js
--- a/devtools/client/aboutdebugging-new/aboutdebugging.js
+++ b/devtools/client/aboutdebugging-new/aboutdebugging.js
@@ -29,31 +29,28 @@ const {
 const {
   addUSBRuntimesObserver,
   disableUSBRuntimes,
   enableUSBRuntimes,
   getUSBRuntimes,
   removeUSBRuntimesObserver,
 } = require("./src/modules/usb-runtimes");
 
-loader.lazyRequireGetter(this, "adbAddon", "devtools/shared/adb/adb-addon", true);
-
 const App = createFactory(require("./src/components/App"));
 
 const { PAGES, RUNTIMES } = require("./src/constants");
 
 const AboutDebugging = {
   async init() {
     if (!Services.prefs.getBoolPref("devtools.enabled", true)) {
       // If DevTools are disabled, navigate to about:devtools.
       window.location = "about:devtools?reason=AboutDebugging";
       return;
     }
 
-    this.onAdbAddonUpdated = this.onAdbAddonUpdated.bind(this);
     this.onNetworkLocationsUpdated = this.onNetworkLocationsUpdated.bind(this);
     this.onUSBRuntimesUpdated = this.onUSBRuntimesUpdated.bind(this);
 
     this.store = configureStore();
     this.actions = bindActionCreators(actions, this.store.dispatch);
 
     const messageContexts = await this.createMessageContexts();
 
@@ -63,19 +60,16 @@ const AboutDebugging = {
     );
 
     this.actions.selectPage(PAGES.THIS_FIREFOX, RUNTIMES.THIS_FIREFOX);
     this.actions.updateNetworkLocations(getNetworkLocations());
 
     addNetworkLocationsObserver(this.onNetworkLocationsUpdated);
     addUSBRuntimesObserver(this.onUSBRuntimesUpdated);
     await enableUSBRuntimes();
-
-    adbAddon.on("update", this.onAdbAddonUpdated);
-    this.onAdbAddonUpdated();
   },
 
   async createMessageContexts() {
     // XXX Until the strings for the updated about:debugging stabilize, we
     // locate them outside the regular directory for locale resources so that
     // they don't get picked up by localization tools.
     if (!L10nRegistry.sources.has("aboutdebugging")) {
       const temporarySource = new FileSource(
@@ -93,20 +87,16 @@ const AboutDebugging = {
     const contexts = [];
     for await (const context of generator) {
       contexts.push(context);
     }
 
     return contexts;
   },
 
-  onAdbAddonUpdated() {
-    this.actions.updateAdbAddonStatus(adbAddon.status);
-  },
-
   onNetworkLocationsUpdated() {
     this.actions.updateNetworkLocations(getNetworkLocations());
   },
 
   onUSBRuntimesUpdated() {
     this.actions.updateUSBRuntimes(getUSBRuntimes());
   },
 
@@ -118,17 +108,16 @@ const AboutDebugging = {
     const currentRuntimeId = state.runtimes.selectedRuntimeId;
     if (currentRuntimeId) {
       await this.actions.unwatchRuntime(currentRuntimeId);
     }
 
     removeNetworkLocationsObserver(this.onNetworkLocationsUpdated);
     removeUSBRuntimesObserver(this.onUSBRuntimesUpdated);
     disableUSBRuntimes();
-    adbAddon.off("update", this.onAdbAddonUpdated);
     setDebugTargetCollapsibilities(state.ui.debugTargetCollapsibilities);
     unmountComponentAtNode(this.mount);
   },
 
   get mount() {
     return document.getElementById("mount");
   },
 };
--- a/devtools/client/aboutdebugging-new/src/actions/ui.js
+++ b/devtools/client/aboutdebugging-new/src/actions/ui.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const {
-  ADB_ADDON_STATUS_UPDATED,
   DEBUG_TARGET_COLLAPSIBILITY_UPDATED,
   NETWORK_LOCATIONS_UPDATED,
   PAGE_SELECTED,
   PAGES,
 } = require("../constants");
 
 const NetworkLocationsModule = require("../modules/network-locations");
 
@@ -56,24 +55,19 @@ function addNetworkLocation(location) {
 }
 
 function removeNetworkLocation(location) {
   return (dispatch, getState) => {
     NetworkLocationsModule.removeNetworkLocation(location);
   };
 }
 
-function updateAdbAddonStatus(adbAddonStatus) {
-  return { type: ADB_ADDON_STATUS_UPDATED, adbAddonStatus };
-}
-
 function updateNetworkLocations(locations) {
   return { type: NETWORK_LOCATIONS_UPDATED, locations };
 }
 
 module.exports = {
   addNetworkLocation,
   removeNetworkLocation,
   selectPage,
-  updateAdbAddonStatus,
   updateDebugTargetCollapsibility,
   updateNetworkLocations,
 };
--- a/devtools/client/aboutdebugging-new/src/components/App.js
+++ b/devtools/client/aboutdebugging-new/src/components/App.js
@@ -16,17 +16,16 @@ const { PAGES } = require("../constants"
 
 const ConnectPage = createFactory(require("./connect/ConnectPage"));
 const RuntimePage = createFactory(require("./RuntimePage"));
 const Sidebar = createFactory(require("./sidebar/Sidebar"));
 
 class App extends PureComponent {
   static get propTypes() {
     return {
-      adbAddonStatus: PropTypes.string,
       // The "dispatch" helper is forwarded to the App component via connect.
       // From that point, components are responsible for forwarding the dispatch
       // property to all components who need to dispatch actions.
       dispatch: PropTypes.func.isRequired,
       messageContexts: PropTypes.arrayOf(PropTypes.object).isRequired,
       networkLocations: PropTypes.arrayOf(PropTypes.string).isRequired,
       runtimes: PropTypes.object.isRequired,
       selectedPage: PropTypes.string,
@@ -47,48 +46,38 @@ class App extends PureComponent {
       default:
         // All pages except for the CONNECT page are RUNTIME pages.
         return RuntimePage({ dispatch });
     }
   }
 
   render() {
     const {
-      adbAddonStatus,
       dispatch,
       messageContexts,
       runtimes,
       selectedPage,
     } = this.props;
 
     return LocalizationProvider(
       { messages: messageContexts },
       dom.div(
         { className: "app" },
-        Sidebar(
-          {
-            adbAddonStatus,
-            className: "app__sidebar",
-            dispatch,
-            runtimes,
-            selectedPage
-          }
-        ),
+        Sidebar({ className: "app__sidebar", dispatch, runtimes, selectedPage }),
         dom.main(
           { className: "app__content" },
           this.getSelectedPageComponent()
         )
       )
     );
   }
 }
 
 const mapStateToProps = state => {
   return {
-    adbAddonStatus: state.ui.adbAddonStatus,
     runtimes: state.runtimes,
     networkLocations: state.ui.networkLocations,
     selectedPage: state.ui.selectedPage,
   };
 };
 
 const mapDispatchToProps = dispatch => ({
   dispatch,
--- a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css
+++ b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.css
@@ -1,11 +1,11 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-.sidebar__devices__message {
+.sidebar__devices__no-devices-message {
   color: var(--grey-40);
   display: inline-block;
   padding: 12px 0;
   text-align: center;
   width: 100%;
 }
\ No newline at end of file
--- a/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js
+++ b/devtools/client/aboutdebugging-new/src/components/sidebar/Sidebar.js
@@ -7,61 +7,43 @@
 const { createFactory, PureComponent } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 
 const FluentReact = require("devtools/client/shared/vendor/fluent-react");
 const Localized = createFactory(FluentReact.Localized);
 
 const { PAGES, RUNTIMES } = require("../../constants");
-loader.lazyRequireGetter(this, "ADB_ADDON_STATES", "devtools/shared/adb/adb-addon", true);
 
 const SidebarFixedItem = createFactory(require("./SidebarFixedItem"));
 const SidebarRuntimeItem = createFactory(require("./SidebarRuntimeItem"));
 const FIREFOX_ICON = "chrome://devtools/skin/images/aboutdebugging-firefox-logo.svg";
 const CONNECT_ICON = "chrome://devtools/skin/images/aboutdebugging-connect-icon.svg";
 const GLOBE_ICON = "chrome://devtools/skin/images/aboutdebugging-globe-icon.svg";
 const USB_ICON = "chrome://devtools/skin/images/aboutdebugging-connect-icon.svg";
 
 class Sidebar extends PureComponent {
   static get propTypes() {
     return {
-      adbAddonStatus: PropTypes.string,
       className: PropTypes.string,
       dispatch: PropTypes.func.isRequired,
       runtimes: PropTypes.object.isRequired,
       selectedPage: PropTypes.string,
     };
   }
 
-  renderAdbAddonStatus() {
-    const isAddonInstalled = this.props.adbAddonStatus === ADB_ADDON_STATES.INSTALLED;
-    const localizationId = isAddonInstalled ? "about-debugging-sidebar-usb-enabled" :
-                                              "about-debugging-sidebar-usb-disabled";
-    return Localized(
-      {
-        id: localizationId
-      }, dom.aside(
-        {
-          className: "sidebar__devices__message js-sidebar-usb-status"
-        },
-        localizationId
-      )
-    );
-  }
-
   renderDevices() {
     const { runtimes } = this.props;
     if (!runtimes.networkRuntimes.length && !runtimes.usbRuntimes.length) {
       return Localized(
         {
           id: "about-debugging-sidebar-no-devices"
-        }, dom.aside(
+        }, dom.span(
           {
-            className: "sidebar__devices__message js-sidebar-no-devices"
+            className: "sidebar__devices__no-devices-message js-sidebar-no-devices"
           },
           "No devices discovered"
         )
       );
     }
 
     return [
       ...this.renderSidebarItems(GLOBE_ICON, runtimes.networkRuntimes),
@@ -116,16 +98,15 @@ class Sidebar extends PureComponent {
             id: PAGES.CONNECT,
             dispatch,
             icon: CONNECT_ICON,
             isSelected: PAGES.CONNECT === selectedPage,
             name: "Connect",
           })
         ),
         dom.hr(),
-        this.renderAdbAddonStatus(),
         this.renderDevices()
       )
     );
   }
 }
 
 module.exports = Sidebar;
--- a/devtools/client/aboutdebugging-new/src/constants.js
+++ b/devtools/client/aboutdebugging-new/src/constants.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const actionTypes = {
-  ADB_ADDON_STATUS_UPDATED: "ADB_ADDON_STATUS_UPDATED",
   CONNECT_RUNTIME_FAILURE: "CONNECT_RUNTIME_FAILURE",
   CONNECT_RUNTIME_START: "CONNECT_RUNTIME_START",
   CONNECT_RUNTIME_SUCCESS: "CONNECT_RUNTIME_SUCCESS",
   DEBUG_TARGET_COLLAPSIBILITY_UPDATED: "DEBUG_TARGET_COLLAPSIBILITY_UPDATED",
   DISCONNECT_RUNTIME_FAILURE: "DISCONNECT_RUNTIME_FAILURE",
   DISCONNECT_RUNTIME_START: "DISCONNECT_RUNTIME_START",
   DISCONNECT_RUNTIME_SUCCESS: "DISCONNECT_RUNTIME_SUCCESS",
   NETWORK_LOCATIONS_UPDATED: "NETWORK_LOCATIONS_UPDATED",
--- a/devtools/client/aboutdebugging-new/src/reducers/ui-state.js
+++ b/devtools/client/aboutdebugging-new/src/reducers/ui-state.js
@@ -1,37 +1,30 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const {
-  ADB_ADDON_STATUS_UPDATED,
   DEBUG_TARGET_COLLAPSIBILITY_UPDATED,
   NETWORK_LOCATIONS_UPDATED,
   PAGE_SELECTED,
 } = require("../constants");
 
 function UiState(locations = [], debugTargetCollapsibilities = {}) {
   return {
-    adbAddonStatus: null,
     debugTargetCollapsibilities,
     networkLocations: locations,
     selectedPage: null,
   };
 }
 
 function uiReducer(state = UiState(), action) {
   switch (action.type) {
-    case ADB_ADDON_STATUS_UPDATED: {
-      const { adbAddonStatus } = action;
-      return Object.assign({}, state, { adbAddonStatus });
-    }
-
     case DEBUG_TARGET_COLLAPSIBILITY_UPDATED: {
       const { isCollapsed, key } = action;
       const debugTargetCollapsibilities = new Map(state.debugTargetCollapsibilities);
       debugTargetCollapsibilities.set(key, isCollapsed);
       return Object.assign({}, state, { debugTargetCollapsibilities });
     }
 
     case NETWORK_LOCATIONS_UPDATED: {
--- a/devtools/client/aboutdebugging-new/test/browser/browser.ini
+++ b/devtools/client/aboutdebugging-new/test/browser/browser.ini
@@ -1,20 +1,18 @@
 [DEFAULT]
 tags = devtools
 subsuite = devtools
 support-files =
   debug-target-pane_collapsibilities_head.js
   head-addons-script.js
   head.js
-  resources/test-adb-extension/*
   resources/test-temporary-extension/*
   !/devtools/client/shared/test/shared-head.js
   !/devtools/client/shared/test/telemetry-test-helpers.js
 
 [browser_aboutdebugging_connect_networklocations.js]
 [browser_aboutdebugging_debug-target-pane_collapsibilities_interaction.js]
 [browser_aboutdebugging_debug-target-pane_collapsibilities_preference.js]
 [browser_aboutdebugging_debug-target-pane_empty.js]
 [browser_aboutdebugging_navigate.js]
 [browser_aboutdebugging_sidebar_network_runtimes.js]
-[browser_aboutdebugging_sidebar_usb_status.js]
 [browser_aboutdebugging_thisfirefox.js]
deleted file mode 100644
--- a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_sidebar_usb_status.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const { adbAddon } = require("devtools/shared/adb/adb-addon");
-const { ADB } = require("devtools/shared/adb/adb");
-
-/**
- * This test asserts that the sidebar shows a message describing the status of the USB
- * devices scanning.
- */
-add_task(async function() {
-  // Make sure the ADB addon is removed and ADB is stopped when the test ends.
-  registerCleanupFunction(async function() {
-    try {
-      await adbAddon.uninstall();
-    } catch (e) {
-      // Will throw if the addon is already uninstalled, ignore exceptions here.
-    }
-
-    await ADB.kill();
-  });
-
-  await pushPref("devtools.remote.adb.extensionURL",
-                 CHROME_URL_ROOT + "resources/test-adb-extension/adb-extension-#OS#.xpi");
-
-  const { document, tab } = await openAboutDebugging();
-
-  const usbStatusElement = document.querySelector(".js-sidebar-usb-status");
-  ok(usbStatusElement, "Sidebar shows the USB status element");
-  ok(usbStatusElement.textContent.includes("USB devices disabled"),
-    "USB status element has the expected content");
-
-  info("Install the adb extension and wait for the message to udpate");
-  adbAddon.install();
-  await waitUntil(() => usbStatusElement.textContent.includes("USB devices enabled"));
-
-  // Right now we are resuming as soon as "USB devices enabled" is displayed, but ADB
-  // might still be starting up. If we move to uninstall directly, the ADB startup will
-  // fail and we will have an unhandled promise rejection.
-  // See Bug 1498469.
-  info("Wait until ADB has started.");
-  await waitUntil(() => ADB.ready);
-
-  info("Uninstall the adb extension and wait for the message to udpate");
-  adbAddon.uninstall();
-  await waitUntil(() => usbStatusElement.textContent.includes("USB devices disabled"));
-
-  await removeTab(tab);
-});
deleted file mode 100644
index 56054c341cdd965be3fe6e0c49d1c9f69f25491a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 9cd737b0177daeea74b617c37da2374f0a664906..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 5af9bc963d65e0ec4596056195ec0eaac436ae41..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 0c10c8502c1496d4e190e1e0a595f805e3bd41ea..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/devtools/client/aboutdebugging-new/tmp-locale/en-US/aboutdebugging.notftl
+++ b/devtools/client/aboutdebugging-new/tmp-locale/en-US/aboutdebugging.notftl
@@ -8,23 +8,16 @@
 # Sidebar heading for selecting the currently running instance of Firefox
 about-debugging-sidebar-this-firefox =
   .name = This Firefox
 
 # Sidebar heading for connecting to some remote source
 about-debugging-sidebar-connect =
   .name = Connect
 
-# Text displayed in the about:debugging sidebar when USB devices discovery is enabled.
-about-debugging-sidebar-usb-enabled = USB devices enabled
-
-# Text displayed in the about:debugging sidebar when USB devices discovery is disabled
-# (for instance because the mandatory ADB extension is not installed).
-about-debugging-sidebar-usb-disabled = USB devices disabled
-
 # Connection status (connected) for runtime items in the sidebar
 aboutdebugging-sidebar-runtime-connection-status-connected = Connected
 # Connection status (disconnected) for runtime items in the sidebar
 aboutdebugging-sidebar-runtime-connection-status-disconnected = Disconnected
 
 # Text displayed in the about:debugging sidebar when no device was found.
 about-debugging-sidebar-no-devices = No devices discovered
 
--- a/devtools/shared/adb/adb-addon.js
+++ b/devtools/shared/adb/adb-addon.js
@@ -3,18 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const {AddonManager} = require("resource://gre/modules/AddonManager.jsm");
 const Services = require("Services");
 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";
+const ADB_LINK = Services.prefs.getCharPref("devtools.remote.adb.extensionURL");
+const ADB_ADDON_ID = Services.prefs.getCharPref("devtools.remote.adb.extensionID");
 
 // Extension ID for adb helper extension that might be installed on Firefox 63 or older.
 const OLD_ADB_ADDON_ID = "adbhelper@mozilla.org";
 
 // Possible values for ADBAddon::state. WebIDE relies on the exact values for localization
 // and styles, so they should not be updated until WebIDE is removed.
 const ADB_ADDON_STATES = {
   DOWNLOADING: "downloading",
@@ -60,23 +60,18 @@ class ADBAddon extends EventEmitter {
       this.emit("update");
     }
   }
 
   get status() {
     return this._status;
   }
 
-  async _getAddon() {
-    const addonId = Services.prefs.getCharPref(PREF_ADB_EXTENSION_ID);
-    return AddonManager.getAddonByID(addonId);
-  }
-
   async updateInstallStatus() {
-    const addon = await this._getAddon();
+    const addon = await AddonManager.getAddonByID(ADB_ADDON_ID);
     if (addon && !addon.userDisabled) {
       this.status = ADB_ADDON_STATES.INSTALLED;
     } else {
       this.status = ADB_ADDON_STATES.UNINSTALLED;
     }
   }
 
   /**
@@ -92,29 +87,28 @@ class ADBAddon extends EventEmitter {
     } else if (platform.includes("Linux")) {
       if (platform.includes("x86_64")) {
         OS = "linux64";
       } else {
         OS = "linux";
       }
     }
 
-    const xpiLink = Services.prefs.getCharPref(PREF_ADB_EXTENSION_URL);
-    return xpiLink.replace(/#OS#/g, OS);
+    return ADB_LINK.replace(/#OS#/g, OS);
   }
 
   /**
    * Install and enable the adb extension. Returns a promise that resolves when ADB is
    * enabled.
    *
    * @param {String} source
    *        String passed to the AddonManager for telemetry.
    */
   async install(source) {
-    const addon = await this._getAddon();
+    const addon = await AddonManager.getAddonByID(ADB_ADDON_ID);
     if (addon && !addon.userDisabled) {
       this.status = ADB_ADDON_STATES.INSTALLED;
       return;
     }
     this.status = ADB_ADDON_STATES.PREPARING;
     if (addon && addon.userDisabled) {
       await addon.enable();
     } else {
@@ -125,17 +119,17 @@ class ADBAddon extends EventEmitter {
         { source }
       );
       install.addListener(this);
       install.install();
     }
   }
 
   async uninstall() {
-    const addon = await this._getAddon();
+    const addon = await AddonManager.getAddonByID(ADB_ADDON_ID);
     addon.uninstall();
   }
 
   async uninstallOldExtension() {
     const oldAddon = await AddonManager.getAddonByID(OLD_ADB_ADDON_ID);
     if (oldAddon) {
       oldAddon.uninstall();
     }