Issue #991 Part 8: Toolkit everything else

This commit is contained in:
Ascrod 2019-04-13 11:22:15 -04:00 • committed by Roy Tam
commit a24456a76d
16 changed files with 62 additions and 216 deletions

View file

@ -19,14 +19,7 @@
if (this.getAttribute("autoscroll") == "false") if (this.getAttribute("autoscroll") == "false")
return false; return false;
var enabled = true; return this.mPrefs.getBoolPref("general.autoScroll", true);
try {
enabled = this.mPrefs.getBoolPref("general.autoScroll");
}
catch (ex) {
}
return enabled;
]]> ]]>
</getter> </getter>
</property> </property>
@ -1427,18 +1420,8 @@
return; return;
// Toggle browse with caret mode // Toggle browse with caret mode
var browseWithCaretOn = false; var browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn, false);
var warn = true; var warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable, true);
try {
warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable);
} catch (ex) {
}
try {
browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn);
} catch (ex) {
}
if (warn && !browseWithCaretOn) { if (warn && !browseWithCaretOn) {
var checkValue = {value:false}; var checkValue = {value:false};
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]

View file

@ -893,12 +893,8 @@
<![CDATA[ <![CDATA[
var psvc = Components.classes["@mozilla.org/preferences-service;1"] var psvc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch); .getService(Components.interfaces.nsIPrefBranch);
var animate = /Mac/.test(navigator.platform); return psvc.getBoolPref("browser.preferences.animateFadeIn",
try { /Mac/.test(navigator.platform));
animate = psvc.getBoolPref("browser.preferences.animateFadeIn");
}
catch (e) { }
return animate;
]]> ]]>
</getter> </getter>
</property> </property>

View file

@ -80,13 +80,8 @@
<property name="scrollIncrement" readonly="true"> <property name="scrollIncrement" readonly="true">
<getter><![CDATA[ <getter><![CDATA[
if (this._scrollIncrement === null) { if (this._scrollIncrement === null) {
try {
this._scrollIncrement = this._prefBranch this._scrollIncrement = this._prefBranch
.getIntPref("toolkit.scrollbox.scrollIncrement"); .getIntPref("toolkit.scrollbox.scrollIncrement", 20);
}
catch (ex) {
this._scrollIncrement = 20;
}
} }
return this._scrollIncrement; return this._scrollIncrement;
]]></getter> ]]></getter>
@ -99,13 +94,8 @@
if (this.hasAttribute("smoothscroll")) { if (this.hasAttribute("smoothscroll")) {
this._smoothScroll = (this.getAttribute("smoothscroll") == "true"); this._smoothScroll = (this.getAttribute("smoothscroll") == "true");
} else { } else {
try {
this._smoothScroll = this._prefBranch this._smoothScroll = this._prefBranch
.getBoolPref("toolkit.scrollbox.smoothScroll"); .getBoolPref("toolkit.scrollbox.smoothScroll", true);
}
catch (ex) {
this._smoothScroll = true;
}
} }
} }
return this._smoothScroll; return this._smoothScroll;
@ -737,12 +727,9 @@
</content> </content>
<implementation implements="nsITimerCallback, nsIDOMEventListener"> <implementation implements="nsITimerCallback, nsIDOMEventListener">
<constructor><![CDATA[ <constructor><![CDATA[
try {
this._scrollDelay = this._prefBranch this._scrollDelay = this._prefBranch
.getIntPref("toolkit.scrollbox.clickToScroll.scrollDelay"); .getIntPref("toolkit.scrollbox.clickToScroll.scrollDelay",
} this._scrollDelay);
catch (ex) {
}
]]></constructor> ]]></constructor>
<destructor><![CDATA[ <destructor><![CDATA[

View file

@ -119,18 +119,14 @@ LinksStorage.prototype = {
get _storedVersion() { get _storedVersion() {
if (this.__storedVersion === undefined) { if (this.__storedVersion === undefined) {
try {
this.__storedVersion =
Services.prefs.getIntPref("browser.newtabpage.storageVersion");
} catch (ex) {
// The storage version is unknown, so either: // The storage version is unknown, so either:
// - it's a new profile // - it's a new profile
// - it's a profile where versioning information got lost // - it's a profile where versioning information got lost
// In this case we still run through all of the valid migrations, // In this case we still run through all of the valid migrations,
// starting from 1, as if it was a downgrade. As previously stated the // starting from 1, as if it was a downgrade. As previously stated the
// migrations should already support running on an updated store. // migrations should already support running on an updated store.
this.__storedVersion = 1; this.__storedVersion =
} Services.prefs.getIntPref("browser.newtabpage.storageVersion", 1);
} }
return this.__storedVersion; return this.__storedVersion;
}, },

View file

@ -16,10 +16,7 @@ function importPrefBranch(aPrefBranch, aPermission, aAction) {
let list = Services.prefs.getChildList(aPrefBranch, {}); let list = Services.prefs.getChildList(aPrefBranch, {});
for (let pref of list) { for (let pref of list) {
let origins = ""; let origins = Services.prefs.getCharPref(pref, "");
try {
origins = Services.prefs.getCharPref(pref);
} catch (e) {}
if (!origins) if (!origins)
continue; continue;

View file

@ -31,13 +31,9 @@ this.UpdateUtils = {
* Whether or not to include the partner bits. Default: true. * Whether or not to include the partner bits. Default: true.
*/ */
getUpdateChannel(aIncludePartners = true) { getUpdateChannel(aIncludePartners = true) {
let channel = AppConstants.MOZ_UPDATE_CHANNEL; let channel = defaults.getCharPref("app.update.channel",
AppConstants.MOZ_UPDATE_CHANNEL);
let defaults = Services.prefs.getDefaultBranch(null); let defaults = Services.prefs.getDefaultBranch(null);
try {
channel = defaults.getCharPref("app.update.channel");
} catch (e) {
// use default value when pref not found
}
if (aIncludePartners) { if (aIncludePartners) {
try { try {
@ -93,15 +89,7 @@ this.UpdateUtils = {
/* Get the distribution pref values, from defaults only */ /* Get the distribution pref values, from defaults only */
function getDistributionPrefValue(aPrefName) { function getDistributionPrefValue(aPrefName) {
var prefValue = "default"; return prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aPrefName, "default");
try {
prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aPrefName);
} catch (e) {
// use default when pref not found
}
return prefValue;
} }
/** /**

View file

@ -186,10 +186,7 @@ var SimpleServiceDiscovery = {
}, },
_searchFixedDevices: function _searchFixedDevices() { _searchFixedDevices: function _searchFixedDevices() {
let fixedDevices = null; let fixedDevices = Services.prefs.getCharPref("browser.casting.fixedDevices", "");
try {
fixedDevices = Services.prefs.getCharPref("browser.casting.fixedDevices");
} catch (e) {}
if (!fixedDevices) { if (!fixedDevices) {
return; return;

View file

@ -253,10 +253,7 @@ nsUnknownContentTypeDialog.prototype = {
if (!aForcePrompt) { if (!aForcePrompt) {
// Check to see if the user wishes to auto save to the default download // Check to see if the user wishes to auto save to the default download
// folder without prompting. Note that preference might not be set. // folder without prompting. Note that preference might not be set.
let autodownload = false; let autodownload = prefs.getBoolPref(PREF_BD_USEDOWNLOADDIR, false);
try {
autodownload = prefs.getBoolPref(PREF_BD_USEDOWNLOADDIR);
} catch (e) { }
if (autodownload) { if (autodownload) {
// Retrieve the user's default download directory // Retrieve the user's default download directory

View file

@ -135,12 +135,7 @@ var PrefObserver = {
Services.obs.removeObserver(this, "xpcom-shutdown"); Services.obs.removeObserver(this, "xpcom-shutdown");
} }
else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) { else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
let debugLogEnabled = false; let debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED, false);
try {
debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
}
catch (e) {
}
if (debugLogEnabled) { if (debugLogEnabled) {
parentLogger.level = Log.Level.Debug; parentLogger.level = Log.Level.Debug;
} }
@ -791,11 +786,7 @@ var AddonManagerInternal = {
} }
catch (e) { } catch (e) { }
let oldPlatformVersion = null; let oldPlatformVersion = Services.prefs.getCharPref(PREF_EM_LAST_PLATFORM_VERSION, "");
try {
oldPlatformVersion = Services.prefs.getCharPref(PREF_EM_LAST_PLATFORM_VERSION);
}
catch (e) { }
if (appChanged !== false) { if (appChanged !== false) {
logger.debug("Application has been upgraded"); logger.debug("Application has been upgraded");
@ -808,40 +799,30 @@ var AddonManagerInternal = {
this.validateBlocklist(); this.validateBlocklist();
} }
try { gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY,
gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY); gCheckCompatibility);
} catch (e) {}
Services.prefs.addObserver(PREF_EM_CHECK_COMPATIBILITY, this, false); Services.prefs.addObserver(PREF_EM_CHECK_COMPATIBILITY, this, false);
try { gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY,
gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY); gStrictCompatibility);
} catch (e) {}
Services.prefs.addObserver(PREF_EM_STRICT_COMPATIBILITY, this, false); Services.prefs.addObserver(PREF_EM_STRICT_COMPATIBILITY, this, false);
try {
let defaultBranch = Services.prefs.getDefaultBranch(""); let defaultBranch = Services.prefs.getDefaultBranch("");
gCheckUpdateSecurityDefault = defaultBranch.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY); gCheckUpdateSecurityDefault = defaultBranch.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY,
} catch(e) {} gCheckUpdateSecurityDefault);
try { gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY,
gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY); gCheckUpdateSecurity);
} catch (e) {}
Services.prefs.addObserver(PREF_EM_CHECK_UPDATE_SECURITY, this, false); Services.prefs.addObserver(PREF_EM_CHECK_UPDATE_SECURITY, this, false);
try { gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED, gUpdateEnabled);
gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED);
} catch (e) {}
Services.prefs.addObserver(PREF_EM_UPDATE_ENABLED, this, false); Services.prefs.addObserver(PREF_EM_UPDATE_ENABLED, this, false);
try { gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT,
gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT); gAutoUpdateDefault);
} catch (e) {}
Services.prefs.addObserver(PREF_EM_AUTOUPDATE_DEFAULT, this, false); Services.prefs.addObserver(PREF_EM_AUTOUPDATE_DEFAULT, this, false);
let defaultProvidersEnabled = true; let defaultProvidersEnabled = Services.prefs.getBoolPref(PREF_DEFAULT_PROVIDERS_ENABLED, true);
try {
defaultProvidersEnabled = Services.prefs.getBoolPref(PREF_DEFAULT_PROVIDERS_ENABLED);
} catch (e) {}
AddonManagerPrivate.recordSimpleMeasure("default_providers", defaultProvidersEnabled); AddonManagerPrivate.recordSimpleMeasure("default_providers", defaultProvidersEnabled);
// Ensure all default providers have had a chance to register themselves // Ensure all default providers have had a chance to register themselves
@ -1167,11 +1148,7 @@ var AddonManagerInternal = {
switch (aData) { switch (aData) {
case PREF_EM_CHECK_COMPATIBILITY: { case PREF_EM_CHECK_COMPATIBILITY: {
let oldValue = gCheckCompatibility; let oldValue = gCheckCompatibility;
try { gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY, true);
gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY);
} catch(e) {
gCheckCompatibility = true;
}
this.callManagerListeners("onCompatibilityModeChanged"); this.callManagerListeners("onCompatibilityModeChanged");
@ -1182,11 +1159,7 @@ var AddonManagerInternal = {
} }
case PREF_EM_STRICT_COMPATIBILITY: { case PREF_EM_STRICT_COMPATIBILITY: {
let oldValue = gStrictCompatibility; let oldValue = gStrictCompatibility;
try { gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY, true);
gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY);
} catch(e) {
gStrictCompatibility = true;
}
this.callManagerListeners("onCompatibilityModeChanged"); this.callManagerListeners("onCompatibilityModeChanged");
@ -1197,11 +1170,7 @@ var AddonManagerInternal = {
} }
case PREF_EM_CHECK_UPDATE_SECURITY: { case PREF_EM_CHECK_UPDATE_SECURITY: {
let oldValue = gCheckUpdateSecurity; let oldValue = gCheckUpdateSecurity;
try { gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, true);
gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY);
} catch(e) {
gCheckUpdateSecurity = true;
}
this.callManagerListeners("onCheckUpdateSecurityChanged"); this.callManagerListeners("onCheckUpdateSecurityChanged");
@ -1212,22 +1181,14 @@ var AddonManagerInternal = {
} }
case PREF_EM_UPDATE_ENABLED: { case PREF_EM_UPDATE_ENABLED: {
let oldValue = gUpdateEnabled; let oldValue = gUpdateEnabled;
try { gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED, true);
gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED);
} catch(e) {
gUpdateEnabled = true;
}
this.callManagerListeners("onUpdateModeChanged"); this.callManagerListeners("onUpdateModeChanged");
break; break;
} }
case PREF_EM_AUTOUPDATE_DEFAULT: { case PREF_EM_AUTOUPDATE_DEFAULT: {
let oldValue = gAutoUpdateDefault; let oldValue = gAutoUpdateDefault;
try { gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT, true);
gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT);
} catch(e) {
gAutoUpdateDefault = true;
}
this.callManagerListeners("onUpdateModeChanged"); this.callManagerListeners("onUpdateModeChanged");
break; break;

View file

@ -64,12 +64,7 @@ var PrefObserver = {
Services.obs.removeObserver(this, "xpcom-shutdown"); Services.obs.removeObserver(this, "xpcom-shutdown");
} }
else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) { else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
let debugLogEnabled = false; let debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED, false);
try {
debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
}
catch (e) {
}
if (debugLogEnabled) { if (debugLogEnabled) {
parentLogger.level = Log.Level.Debug; parentLogger.level = Log.Level.Debug;
} }

View file

@ -154,13 +154,7 @@ this.GMPPrefs = {
get: function(aKey, aDefaultValue, aPlugin) { get: function(aKey, aDefaultValue, aPlugin) {
if (aKey === this.KEY_APP_DISTRIBUTION || if (aKey === this.KEY_APP_DISTRIBUTION ||
aKey === this.KEY_APP_DISTRIBUTION_VERSION) { aKey === this.KEY_APP_DISTRIBUTION_VERSION) {
let prefValue = "default"; return Services.prefs.getDefaultBranch(null).getCharPref(aKey, "default");
try {
prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aKey);
} catch (e) {
// use default when pref not found
}
return prefValue;
} }
return Preferences.get(this.getPrefKey(aKey, aPlugin), aDefaultValue); return Preferences.get(this.getPrefKey(aKey, aPlugin), aDefaultValue);
}, },

View file

@ -49,12 +49,7 @@ this.__defineGetter__("_prefs", function prefsGetter() {
this.__defineGetter__("_maxUsedThemes", function maxUsedThemesGetter() { this.__defineGetter__("_maxUsedThemes", function maxUsedThemesGetter() {
delete this._maxUsedThemes; delete this._maxUsedThemes;
try { this._maxUsedThemes = _prefs.getIntPref("maxUsedThemes", DEFAULT_MAX_USED_THEMES_COUNT);
this._maxUsedThemes = _prefs.getIntPref("maxUsedThemes");
}
catch (e) {
this._maxUsedThemes = DEFAULT_MAX_USED_THEMES_COUNT;
}
return this._maxUsedThemes; return this._maxUsedThemes;
}); });
@ -719,12 +714,8 @@ var _previewTimerCallback = {
function _prefObserver(aSubject, aTopic, aData) { function _prefObserver(aSubject, aTopic, aData) {
switch (aData) { switch (aData) {
case "maxUsedThemes": case "maxUsedThemes":
try { _maxUsedThemes = _prefs.getIntPref(aData, DEFAULT_MAX_USED_THEMES_COUNT);
_maxUsedThemes = _prefs.getIntPref(aData);
}
catch (e) {
_maxUsedThemes = DEFAULT_MAX_USED_THEMES_COUNT;
}
// Update the theme list to remove any themes over the number we keep // Update the theme list to remove any themes over the number we keep
_updateUsedThemes(LightweightThemeManager.usedThemes); _updateUsedThemes(LightweightThemeManager.usedThemes);
break; break;

View file

@ -179,12 +179,7 @@ var PrefObserver = {
Services.obs.removeObserver(this, "xpcom-shutdown"); Services.obs.removeObserver(this, "xpcom-shutdown");
} }
else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) { else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
try { gDebugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED, false);
gDebugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
}
catch (e) {
gDebugLogEnabled = false;
}
} }
} }
}; };

View file

@ -486,14 +486,7 @@ this.AddonRepository = {
} }
let preference = PREF_GETADDONS_CACHE_ENABLED; let preference = PREF_GETADDONS_CACHE_ENABLED;
let enabled = false; return Services.prefs.getBoolPref(preference, false);
try {
enabled = Services.prefs.getBoolPref(preference);
} catch(e) {
logger.warn("cacheEnabled: Couldn't get pref: " + preference);
}
return enabled;
}, },
// A cache of the add-ons stored in the database // A cache of the add-ons stored in the database
@ -541,11 +534,7 @@ this.AddonRepository = {
metadataAge: function() { metadataAge: function() {
let now = Math.round(Date.now() / 1000); let now = Math.round(Date.now() / 1000);
let lastUpdate = Services.prefs.getIntPref(PREF_METADATA_LASTUPDATE, 0);
let lastUpdate = 0;
try {
lastUpdate = Services.prefs.getIntPref(PREF_METADATA_LASTUPDATE);
} catch (e) {}
// Handle clock jumps // Handle clock jumps
if (now < lastUpdate) { if (now < lastUpdate) {
@ -555,10 +544,8 @@ this.AddonRepository = {
}, },
isMetadataStale: function AddonRepo_isMetadataStale() { isMetadataStale: function AddonRepo_isMetadataStale() {
let threshold = DEFAULT_METADATA_UPDATETHRESHOLD_SEC; let threshold = Services.prefs.getIntPref(PREF_METADATA_UPDATETHRESHOLD_SEC,
try { DEFAULT_METADATA_UPDATETHRESHOLD_SEC);
threshold = Services.prefs.getIntPref(PREF_METADATA_UPDATETHRESHOLD_SEC);
} catch (e) {}
return (this.metadataAge() > threshold); return (this.metadataAge() > threshold);
}, },
@ -1543,10 +1530,8 @@ this.AddonRepository = {
// Create url from preference, returning null if preference does not exist // Create url from preference, returning null if preference does not exist
_formatURLPref: function AddonRepo_formatURLPref(aPreference, aSubstitutions) { _formatURLPref: function AddonRepo_formatURLPref(aPreference, aSubstitutions) {
let url = null; let url = Services.prefs.getCharPref(aPreference, "");
try { if (!url) {
url = Services.prefs.getCharPref(aPreference);
} catch(e) {
logger.warn("_formatURLPref: Couldn't get pref: " + aPreference); logger.warn("_formatURLPref: Couldn't get pref: " + aPreference);
return null; return null;
} }
@ -1639,10 +1624,7 @@ var AddonDatabase = {
// Create a blank addons.json file // Create a blank addons.json file
this._saveDBToDisk(); this._saveDBToDisk();
let dbSchema = 0; let dbSchema = Services.prefs.getIntPref(PREF_GETADDONS_DB_SCHEMA, 0);
try {
dbSchema = Services.prefs.getIntPref(PREF_GETADDONS_DB_SCHEMA);
} catch (e) {}
if (dbSchema < DB_MIN_JSON_SCHEMA) { if (dbSchema < DB_MIN_JSON_SCHEMA) {
let results = yield new Promise((resolve, reject) => { let results = yield new Promise((resolve, reject) => {

View file

@ -608,12 +608,7 @@ function UpdateParser(aId, aUpdateKey, aUrl, aObserver) {
this.observer = aObserver; this.observer = aObserver;
this.url = aUrl; this.url = aUrl;
let requireBuiltIn = true; let requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, true);
try {
requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS);
}
catch (e) {
}
logger.debug("Requesting " + aUrl); logger.debug("Requesting " + aUrl);
try { try {
@ -651,12 +646,7 @@ UpdateParser.prototype = {
this.request = null; this.request = null;
this._doneAt = new Error("place holder"); this._doneAt = new Error("place holder");
let requireBuiltIn = true; let requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, true);
try {
requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS);
}
catch (e) {
}
try { try {
CertUtils.checkCert(request.channel, !requireBuiltIn); CertUtils.checkCert(request.channel, !requireBuiltIn);

View file

@ -1410,10 +1410,7 @@ this.XPIDatabase = {
// when a lightweight theme is applied for example) // when a lightweight theme is applied for example)
text += "\r\n[ThemeDirs]\r\n"; text += "\r\n[ThemeDirs]\r\n";
let dssEnabled = false; let dssEnabled = Services.prefs.getBoolPref(PREF_EM_DSS_ENABLED, false);
try {
dssEnabled = Services.prefs.getBoolPref(PREF_EM_DSS_ENABLED);
} catch (e) {}
let themes = []; let themes = [];
if (dssEnabled) { if (dssEnabled) {