Bug 1460629: Make dictionaries compat-by-default again. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Thu, 10 May 2018 08:17:24 -0700
changeset 793650 83b7303396d89952bab1b054d64d70c106de9982
parent 793442 e40e77f848063469114960ac2f13dae5649b328f
push id109457
push usermaglione.k@gmail.com
push dateThu, 10 May 2018 15:17:47 +0000
reviewersaswan
bugs1460629
milestone62.0a1
Bug 1460629: Make dictionaries compat-by-default again. r?aswan MozReview-Commit-ID: FKr6V60aih9
toolkit/mozapps/extensions/internal/XPIDatabase.jsm
toolkit/mozapps/extensions/internal/XPIInstall.jsm
toolkit/mozapps/extensions/test/xpcshell/test_strictcompatibility.js
--- a/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
@@ -100,17 +100,18 @@ const KEY_APP_TEMPORARY               = 
 // Properties to cache and reload when an addon installation is pending
 const PENDING_INSTALL_METADATA =
     ["syncGUID", "targetApplications", "userDisabled", "softDisabled",
      "existingAddonID", "sourceURI", "releaseNotesURI", "installDate",
      "updateDate", "applyBackgroundUpdates", "compatibilityOverrides"];
 
 const COMPATIBLE_BY_DEFAULT_TYPES = {
   extension: true,
-  dictionary: true
+  dictionary: true,
+  "webextension-dictionary": true,
 };
 
 // Properties that exist in the install manifest
 const PROP_LOCALE_SINGLE = ["name", "description", "creator", "homepageURL"];
 const PROP_LOCALE_MULTI  = ["developers", "translators", "contributors"];
 
 // Properties to save in JSON file
 const PROP_JSON_FIELDS = ["id", "syncGUID", "location", "version", "type",
--- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm
@@ -177,16 +177,17 @@ const PROP_LOCALE_MULTI  = ["developers"
 const TYPES = {
   extension: 2,
   dictionary: 64,
 };
 
 const COMPATIBLE_BY_DEFAULT_TYPES = {
   extension: true,
   dictionary: true,
+  "webextension-dictionary": true,
 };
 
 const RESTARTLESS_TYPES = new Set([
   "dictionary",
   "webextension",
   "webextension-dictionary",
   "webextension-theme",
 ]);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_strictcompatibility.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_strictcompatibility.js
@@ -118,17 +118,17 @@ const ADDONS = {
         id: "xpcshell@tests.mozilla.org",
         minVersion: "0.8",
         maxVersion: "0.9"
       }]
     },
     expected: {
       strictCompatibility: false,
     },
-    compatible: [false, false, false, false],
+    compatible: [false, true,  false, true],
   },
 };
 
 const IDS = Object.keys(ADDONS);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");