Bug 1451402 - Stop appending @personas.mozilla.org suffix for built-in themes. r=kmag draft
authorTim Nguyen <ntim.bugs@gmail.com>
Tue, 26 Jun 2018 13:39:47 +0100
changeset 810878 300b85f7b7b3fe3ad2aab3dde6d9750c97e575de
parent 810877 c73839c52e5752755828d591c469184e07fdd92d
child 810879 bc2cf45138bbf66411bb9513a4300136bb2024c8
push id114145
push userbmo:ntim.bugs@gmail.com
push dateTue, 26 Jun 2018 17:13:02 +0000
reviewerskmag
bugs1451402
milestone63.0a1
Bug 1451402 - Stop appending @personas.mozilla.org suffix for built-in themes. r=kmag MozReview-Commit-ID: CCRraTIKbR3
toolkit/mozapps/extensions/LightweightThemeManager.jsm
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -660,26 +660,26 @@ AddonWrapper.prototype = {
  *          The ID to be converted
  *
  * @return  the lightweight theme ID or null if the ID was not for a lightweight
  *          theme.
  */
 function _getInternalID(id) {
   if (!id)
     return null;
-  if (id == DEFAULT_THEME_ID)
+  if (LightweightThemeManager._builtInThemes.has(id))
     return id;
   let len = id.length - ID_SUFFIX.length;
   if (len > 0 && id.substring(len) == ID_SUFFIX)
     return id.substring(0, len);
   return null;
 }
 
 function _getExternalID(id) {
-  if (id == DEFAULT_THEME_ID)
+  if (LightweightThemeManager._builtInThemes.has(id))
     return id;
   return id + ID_SUFFIX;
 }
 
 function _setCurrentTheme(aData, aLocal) {
   aData = _sanitizeTheme(aData, null, aLocal);
 
   let cancel = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);