Bug 1477137 - Part 1: Add onUninstalling and onOperationCancelled listeners to detect removal/undo extension in aboutaddons. r=jdescottes
☠☠ backed out by 6ddec20d1e35 ☠ ☠
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Fri, 27 Jul 2018 10:32:22 +0900
changeset 428709 dd5e331122a911f9bb88e50205de4e2e841073cd
parent 428708 16001f32b7f9a2f6a6bb919fad1dbfeed223eab2
child 428710 c75f46c67e2733766dc9f2a3b6ac7979b6ef65f7
push id34340
push userdvarga@mozilla.com
push dateFri, 27 Jul 2018 17:37:02 +0000
treeherdermozilla-central@d353b80fd66c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1477137
milestone63.0a1
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
Bug 1477137 - Part 1: Add onUninstalling and onOperationCancelled listeners to detect removal/undo extension in aboutaddons. r=jdescottes MozReview-Commit-ID: RaDFBOirgL
devtools/client/aboutdebugging/components/addons/Panel.js
--- a/devtools/client/aboutdebugging/components/addons/Panel.js
+++ b/devtools/client/aboutdebugging/components/addons/Panel.js
@@ -49,16 +49,18 @@ class AddonsPanel extends Component {
 
     this.updateDebugStatus = this.updateDebugStatus.bind(this);
     this.updateShowSystemStatus = this.updateShowSystemStatus.bind(this);
     this.updateAddonsList = this.updateAddonsList.bind(this);
     this.onInstalled = this.onInstalled.bind(this);
     this.onUninstalled = this.onUninstalled.bind(this);
     this.onEnabled = this.onEnabled.bind(this);
     this.onDisabled = this.onDisabled.bind(this);
+    this.onUninstalling = this.onUninstalling.bind(this);
+    this.onOperationCancelled = this.onOperationCancelled.bind(this);
   }
 
   componentDidMount() {
     AddonManager.addAddonListener(this);
     // Listen to startup since that's when errors and warnings
     // get populated on the extension.
     Management.on("startup", this.updateAddonsList);
 
@@ -147,16 +149,30 @@ class AddonsPanel extends Component {
 
   /**
    * Mandatory callback as AddonManager listener.
    */
   onDisabled() {
     this.updateAddonsList();
   }
 
+  /**
+   * Mandatory callback as AddonManager listener.
+   */
+  onUninstalling() {
+    this.updateAddonsList();
+  }
+
+  /**
+   * Mandatory callback as AddonManager listener.
+   */
+  onOperationCancelled() {
+    this.updateAddonsList();
+  }
+
   render() {
     const { client, connect, id } = this.props;
     const { debugDisabled, extensions: targets, showSystemAddons } = this.state;
     const installedName = Strings.GetStringFromName("extensions");
     const temporaryName = Strings.GetStringFromName("temporaryExtensions");
     const systemName = Strings.GetStringFromName("systemExtensions");
     const targetClass = AddonTarget;