Bug 1159698 - Opt-out dialog has a button for "disable", but actually the addon is removed;r/a=philipp
authorMakeMyDay <makemyday@gmx-topmail.de>
Sat, 09 May 2015 16:30:30 +0200
changeset 25930 d378aa365a2d2098f61e06cc22f08e2ac9968e55
parent 25929 a52dfd4f91feffbaa56993133202316ed551d118
child 25931 6117bc38a1fee7ac7c5fc70e2d710c99b5b28711
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1159698
Bug 1159698 - Opt-out dialog has a button for "disable", but actually the addon is removed;r/a=philipp
calendar/lightning/content/messenger-overlay-sidebar.js
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -209,31 +209,20 @@ function ltnIntegrationNotification() {
                     document.getElementById("messagepanebox");
 
     let appBrand = cal.calGetString("brand", "brandShortName", null, "branding");
     let ltnBrand = ltnGetString("lightning", "brandShortName");
     let label = ltnGetString("lightning", "integrationLabel", [appBrand, ltnBrand]);
 
     // call backs for doing/undoing Lightning removal
     let cbRemoveLightning = function (aAddon) {
-        try {
-            aAddon.uninstall();
-        } catch (e) {
-            aAddon.userDisabled = true;
-        }
+        aAddon.userDisabled = true;
     };
     let cbUndoRemoveLightning = function (aAddon) {
-        switch (aAddon.pendingOperations) {
-            case AddonManager.PENDING_DISABLE:
-                aAddon.userDisabled = false;
-                break;
-            case AddonManager.PENDING_UNINSTALL:
-                aAddon.cancelUninstall();
-                break;
-        }
+        aAddon.userDisabled = false;
     };
 
     // call backs for the undo opt-out bar
     let cbRestartNow = function(aNotificationBar, aButton) {
         Services.startup.quit(Components.interfaces.nsIAppStartup.eRestart |
                               Components.interfaces.nsIAppStartup.eForceQuit);
     };
     let cbUndoOptOut = function(aNotificationBar, aButton) {