Bug 1522237 Allow xpi themes to be disabled r=rpl
authorAndrew Swan <aswan@mozilla.com>
Fri, 15 Mar 2019 14:40:52 +0000
changeset 464592 3903ec67f703bfddc21211dcebca7141e099f29f
parent 464591 7a0c015fcc50407349ec27b25ad0c002edca0f60
child 464593 31dc14d0b906b79c5feb63a745bb05a71b93160b
push id112465
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:50:10 +0000
treeherdermozilla-inbound@e0861be8d6c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl
bugs1522237
milestone67.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 1522237 Allow xpi themes to be disabled r=rpl Differential Revision: https://phabricator.services.mozilla.com/D17888
toolkit/mozapps/extensions/internal/XPIDatabase.jsm
--- a/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
@@ -593,17 +593,17 @@ class AddonInternal {
 
     // Add-ons that aren't installed cannot be modified in any way
     if (!(this.inDatabase))
       return permissions;
 
     if (!this.appDisabled) {
       if (this.userDisabled || this.softDisabled) {
         permissions |= AddonManager.PERM_CAN_ENABLE;
-      } else if (this.type != "theme") {
+      } else {
         permissions |= AddonManager.PERM_CAN_DISABLE;
       }
     }
 
     // Add-ons that are in locked install locations, or are pending uninstall
     // cannot be upgraded or uninstalled
     if (!this.location.locked && !this.pendingUninstall) {
       // System add-on upgrades are triggered through a different mechanism (see updateSystemAddons())