Bug 1472286 - 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 812658 f4df49e52887d4974afdb46d68dbaadcfa86be5d
parent 812643 f3b2be54ff207a82b22f49037b42a70b14a9ef19
child 812659 25a047d5efba60f8a1ad9ee3dd9ed379bd3952c5
child 812925 49f6882c19898c604544d19128dfb3700aea2692
push id114623
push userbmo:ntim.bugs@gmail.com
push dateFri, 29 Jun 2018 18:49:05 +0000
reviewerskmag
bugs1472286
milestone63.0a1
Bug 1472286 - 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
@@ -730,26 +730,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);