mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 03:17:31 +09:00
Issue #991 Part 8: Toolkit everything else
This commit is contained in:
parent
e309515e66
commit
a24456a76d
16 changed files with 62 additions and 216 deletions
|
|
@ -19,14 +19,7 @@
|
|||
if (this.getAttribute("autoscroll") == "false")
|
||||
return false;
|
||||
|
||||
var enabled = true;
|
||||
try {
|
||||
enabled = this.mPrefs.getBoolPref("general.autoScroll");
|
||||
}
|
||||
catch (ex) {
|
||||
}
|
||||
|
||||
return enabled;
|
||||
return this.mPrefs.getBoolPref("general.autoScroll", true);
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
|
@ -1427,18 +1420,8 @@
|
|||
return;
|
||||
|
||||
// Toggle browse with caret mode
|
||||
var browseWithCaretOn = false;
|
||||
var warn = true;
|
||||
|
||||
try {
|
||||
warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable);
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
try {
|
||||
browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn);
|
||||
} catch (ex) {
|
||||
}
|
||||
var browseWithCaretOn = this.mPrefs.getBoolPref(kPrefCaretBrowsingOn, false);
|
||||
var warn = this.mPrefs.getBoolPref(kPrefWarnOnEnable, true);
|
||||
if (warn && !browseWithCaretOn) {
|
||||
var checkValue = {value:false};
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
|
|
|
|||
|
|
@ -893,12 +893,8 @@
|
|||
<![CDATA[
|
||||
var psvc = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var animate = /Mac/.test(navigator.platform);
|
||||
try {
|
||||
animate = psvc.getBoolPref("browser.preferences.animateFadeIn");
|
||||
}
|
||||
catch (e) { }
|
||||
return animate;
|
||||
return psvc.getBoolPref("browser.preferences.animateFadeIn",
|
||||
/Mac/.test(navigator.platform));
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -80,13 +80,8 @@
|
|||
<property name="scrollIncrement" readonly="true">
|
||||
<getter><![CDATA[
|
||||
if (this._scrollIncrement === null) {
|
||||
try {
|
||||
this._scrollIncrement = this._prefBranch
|
||||
.getIntPref("toolkit.scrollbox.scrollIncrement");
|
||||
}
|
||||
catch (ex) {
|
||||
this._scrollIncrement = 20;
|
||||
}
|
||||
this._scrollIncrement = this._prefBranch
|
||||
.getIntPref("toolkit.scrollbox.scrollIncrement", 20);
|
||||
}
|
||||
return this._scrollIncrement;
|
||||
]]></getter>
|
||||
|
|
@ -99,13 +94,8 @@
|
|||
if (this.hasAttribute("smoothscroll")) {
|
||||
this._smoothScroll = (this.getAttribute("smoothscroll") == "true");
|
||||
} else {
|
||||
try {
|
||||
this._smoothScroll = this._prefBranch
|
||||
.getBoolPref("toolkit.scrollbox.smoothScroll");
|
||||
}
|
||||
catch (ex) {
|
||||
this._smoothScroll = true;
|
||||
}
|
||||
this._smoothScroll = this._prefBranch
|
||||
.getBoolPref("toolkit.scrollbox.smoothScroll", true);
|
||||
}
|
||||
}
|
||||
return this._smoothScroll;
|
||||
|
|
@ -737,12 +727,9 @@
|
|||
</content>
|
||||
<implementation implements="nsITimerCallback, nsIDOMEventListener">
|
||||
<constructor><![CDATA[
|
||||
try {
|
||||
this._scrollDelay = this._prefBranch
|
||||
.getIntPref("toolkit.scrollbox.clickToScroll.scrollDelay");
|
||||
}
|
||||
catch (ex) {
|
||||
}
|
||||
this._scrollDelay = this._prefBranch
|
||||
.getIntPref("toolkit.scrollbox.clickToScroll.scrollDelay",
|
||||
this._scrollDelay);
|
||||
]]></constructor>
|
||||
|
||||
<destructor><![CDATA[
|
||||
|
|
|
|||
|
|
@ -119,18 +119,14 @@ LinksStorage.prototype = {
|
|||
|
||||
get _storedVersion() {
|
||||
if (this.__storedVersion === undefined) {
|
||||
try {
|
||||
this.__storedVersion =
|
||||
Services.prefs.getIntPref("browser.newtabpage.storageVersion");
|
||||
} catch (ex) {
|
||||
// The storage version is unknown, so either:
|
||||
// - it's a new profile
|
||||
// - it's a profile where versioning information got lost
|
||||
// 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
|
||||
// migrations should already support running on an updated store.
|
||||
this.__storedVersion = 1;
|
||||
}
|
||||
// The storage version is unknown, so either:
|
||||
// - it's a new profile
|
||||
// - it's a profile where versioning information got lost
|
||||
// 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
|
||||
// migrations should already support running on an updated store.
|
||||
this.__storedVersion =
|
||||
Services.prefs.getIntPref("browser.newtabpage.storageVersion", 1);
|
||||
}
|
||||
return this.__storedVersion;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,10 +16,7 @@ function importPrefBranch(aPrefBranch, aPermission, aAction) {
|
|||
let list = Services.prefs.getChildList(aPrefBranch, {});
|
||||
|
||||
for (let pref of list) {
|
||||
let origins = "";
|
||||
try {
|
||||
origins = Services.prefs.getCharPref(pref);
|
||||
} catch (e) {}
|
||||
let origins = Services.prefs.getCharPref(pref, "");
|
||||
|
||||
if (!origins)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -31,13 +31,9 @@ this.UpdateUtils = {
|
|||
* Whether or not to include the partner bits. Default: 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);
|
||||
try {
|
||||
channel = defaults.getCharPref("app.update.channel");
|
||||
} catch (e) {
|
||||
// use default value when pref not found
|
||||
}
|
||||
|
||||
if (aIncludePartners) {
|
||||
try {
|
||||
|
|
@ -93,15 +89,7 @@ this.UpdateUtils = {
|
|||
|
||||
/* Get the distribution pref values, from defaults only */
|
||||
function getDistributionPrefValue(aPrefName) {
|
||||
var prefValue = "default";
|
||||
|
||||
try {
|
||||
prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aPrefName);
|
||||
} catch (e) {
|
||||
// use default when pref not found
|
||||
}
|
||||
|
||||
return prefValue;
|
||||
return prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aPrefName, "default");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -186,10 +186,7 @@ var SimpleServiceDiscovery = {
|
|||
},
|
||||
|
||||
_searchFixedDevices: function _searchFixedDevices() {
|
||||
let fixedDevices = null;
|
||||
try {
|
||||
fixedDevices = Services.prefs.getCharPref("browser.casting.fixedDevices");
|
||||
} catch (e) {}
|
||||
let fixedDevices = Services.prefs.getCharPref("browser.casting.fixedDevices", "");
|
||||
|
||||
if (!fixedDevices) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -253,10 +253,7 @@ nsUnknownContentTypeDialog.prototype = {
|
|||
if (!aForcePrompt) {
|
||||
// Check to see if the user wishes to auto save to the default download
|
||||
// folder without prompting. Note that preference might not be set.
|
||||
let autodownload = false;
|
||||
try {
|
||||
autodownload = prefs.getBoolPref(PREF_BD_USEDOWNLOADDIR);
|
||||
} catch (e) { }
|
||||
let autodownload = prefs.getBoolPref(PREF_BD_USEDOWNLOADDIR, false);
|
||||
|
||||
if (autodownload) {
|
||||
// Retrieve the user's default download directory
|
||||
|
|
|
|||
|
|
@ -135,12 +135,7 @@ var PrefObserver = {
|
|||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
}
|
||||
else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
|
||||
let debugLogEnabled = false;
|
||||
try {
|
||||
debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
let debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED, false);
|
||||
if (debugLogEnabled) {
|
||||
parentLogger.level = Log.Level.Debug;
|
||||
}
|
||||
|
|
@ -791,11 +786,7 @@ var AddonManagerInternal = {
|
|||
}
|
||||
catch (e) { }
|
||||
|
||||
let oldPlatformVersion = null;
|
||||
try {
|
||||
oldPlatformVersion = Services.prefs.getCharPref(PREF_EM_LAST_PLATFORM_VERSION);
|
||||
}
|
||||
catch (e) { }
|
||||
let oldPlatformVersion = Services.prefs.getCharPref(PREF_EM_LAST_PLATFORM_VERSION, "");
|
||||
|
||||
if (appChanged !== false) {
|
||||
logger.debug("Application has been upgraded");
|
||||
|
|
@ -808,40 +799,30 @@ var AddonManagerInternal = {
|
|||
this.validateBlocklist();
|
||||
}
|
||||
|
||||
try {
|
||||
gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY);
|
||||
} catch (e) {}
|
||||
gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY,
|
||||
gCheckCompatibility);
|
||||
Services.prefs.addObserver(PREF_EM_CHECK_COMPATIBILITY, this, false);
|
||||
|
||||
try {
|
||||
gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY);
|
||||
} catch (e) {}
|
||||
gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY,
|
||||
gStrictCompatibility);
|
||||
Services.prefs.addObserver(PREF_EM_STRICT_COMPATIBILITY, this, false);
|
||||
|
||||
try {
|
||||
let defaultBranch = Services.prefs.getDefaultBranch("");
|
||||
gCheckUpdateSecurityDefault = defaultBranch.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY);
|
||||
} catch(e) {}
|
||||
let defaultBranch = Services.prefs.getDefaultBranch("");
|
||||
gCheckUpdateSecurityDefault = defaultBranch.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY,
|
||||
gCheckUpdateSecurityDefault);
|
||||
|
||||
try {
|
||||
gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY);
|
||||
} catch (e) {}
|
||||
gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY,
|
||||
gCheckUpdateSecurity);
|
||||
Services.prefs.addObserver(PREF_EM_CHECK_UPDATE_SECURITY, this, false);
|
||||
|
||||
try {
|
||||
gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED);
|
||||
} catch (e) {}
|
||||
gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED, gUpdateEnabled);
|
||||
Services.prefs.addObserver(PREF_EM_UPDATE_ENABLED, this, false);
|
||||
|
||||
try {
|
||||
gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT);
|
||||
} catch (e) {}
|
||||
gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT,
|
||||
gAutoUpdateDefault);
|
||||
Services.prefs.addObserver(PREF_EM_AUTOUPDATE_DEFAULT, this, false);
|
||||
|
||||
let defaultProvidersEnabled = true;
|
||||
try {
|
||||
defaultProvidersEnabled = Services.prefs.getBoolPref(PREF_DEFAULT_PROVIDERS_ENABLED);
|
||||
} catch (e) {}
|
||||
let defaultProvidersEnabled = Services.prefs.getBoolPref(PREF_DEFAULT_PROVIDERS_ENABLED, true);
|
||||
AddonManagerPrivate.recordSimpleMeasure("default_providers", defaultProvidersEnabled);
|
||||
|
||||
// Ensure all default providers have had a chance to register themselves
|
||||
|
|
@ -1167,11 +1148,7 @@ var AddonManagerInternal = {
|
|||
switch (aData) {
|
||||
case PREF_EM_CHECK_COMPATIBILITY: {
|
||||
let oldValue = gCheckCompatibility;
|
||||
try {
|
||||
gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY);
|
||||
} catch(e) {
|
||||
gCheckCompatibility = true;
|
||||
}
|
||||
gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY, true);
|
||||
|
||||
this.callManagerListeners("onCompatibilityModeChanged");
|
||||
|
||||
|
|
@ -1182,11 +1159,7 @@ var AddonManagerInternal = {
|
|||
}
|
||||
case PREF_EM_STRICT_COMPATIBILITY: {
|
||||
let oldValue = gStrictCompatibility;
|
||||
try {
|
||||
gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY);
|
||||
} catch(e) {
|
||||
gStrictCompatibility = true;
|
||||
}
|
||||
gStrictCompatibility = Services.prefs.getBoolPref(PREF_EM_STRICT_COMPATIBILITY, true);
|
||||
|
||||
this.callManagerListeners("onCompatibilityModeChanged");
|
||||
|
||||
|
|
@ -1197,11 +1170,7 @@ var AddonManagerInternal = {
|
|||
}
|
||||
case PREF_EM_CHECK_UPDATE_SECURITY: {
|
||||
let oldValue = gCheckUpdateSecurity;
|
||||
try {
|
||||
gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY);
|
||||
} catch(e) {
|
||||
gCheckUpdateSecurity = true;
|
||||
}
|
||||
gCheckUpdateSecurity = Services.prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, true);
|
||||
|
||||
this.callManagerListeners("onCheckUpdateSecurityChanged");
|
||||
|
||||
|
|
@ -1212,22 +1181,14 @@ var AddonManagerInternal = {
|
|||
}
|
||||
case PREF_EM_UPDATE_ENABLED: {
|
||||
let oldValue = gUpdateEnabled;
|
||||
try {
|
||||
gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED);
|
||||
} catch(e) {
|
||||
gUpdateEnabled = true;
|
||||
}
|
||||
gUpdateEnabled = Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED, true);
|
||||
|
||||
this.callManagerListeners("onUpdateModeChanged");
|
||||
break;
|
||||
}
|
||||
case PREF_EM_AUTOUPDATE_DEFAULT: {
|
||||
let oldValue = gAutoUpdateDefault;
|
||||
try {
|
||||
gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT);
|
||||
} catch(e) {
|
||||
gAutoUpdateDefault = true;
|
||||
}
|
||||
gAutoUpdateDefault = Services.prefs.getBoolPref(PREF_EM_AUTOUPDATE_DEFAULT, true);
|
||||
|
||||
this.callManagerListeners("onUpdateModeChanged");
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -64,12 +64,7 @@ var PrefObserver = {
|
|||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
}
|
||||
else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
|
||||
let debugLogEnabled = false;
|
||||
try {
|
||||
debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
let debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED, false);
|
||||
if (debugLogEnabled) {
|
||||
parentLogger.level = Log.Level.Debug;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,13 +154,7 @@ this.GMPPrefs = {
|
|||
get: function(aKey, aDefaultValue, aPlugin) {
|
||||
if (aKey === this.KEY_APP_DISTRIBUTION ||
|
||||
aKey === this.KEY_APP_DISTRIBUTION_VERSION) {
|
||||
let prefValue = "default";
|
||||
try {
|
||||
prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aKey);
|
||||
} catch (e) {
|
||||
// use default when pref not found
|
||||
}
|
||||
return prefValue;
|
||||
return Services.prefs.getDefaultBranch(null).getCharPref(aKey, "default");
|
||||
}
|
||||
return Preferences.get(this.getPrefKey(aKey, aPlugin), aDefaultValue);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -49,12 +49,7 @@ this.__defineGetter__("_prefs", function prefsGetter() {
|
|||
|
||||
this.__defineGetter__("_maxUsedThemes", function maxUsedThemesGetter() {
|
||||
delete this._maxUsedThemes;
|
||||
try {
|
||||
this._maxUsedThemes = _prefs.getIntPref("maxUsedThemes");
|
||||
}
|
||||
catch (e) {
|
||||
this._maxUsedThemes = DEFAULT_MAX_USED_THEMES_COUNT;
|
||||
}
|
||||
this._maxUsedThemes = _prefs.getIntPref("maxUsedThemes", DEFAULT_MAX_USED_THEMES_COUNT);
|
||||
return this._maxUsedThemes;
|
||||
});
|
||||
|
||||
|
|
@ -719,12 +714,8 @@ var _previewTimerCallback = {
|
|||
function _prefObserver(aSubject, aTopic, aData) {
|
||||
switch (aData) {
|
||||
case "maxUsedThemes":
|
||||
try {
|
||||
_maxUsedThemes = _prefs.getIntPref(aData);
|
||||
}
|
||||
catch (e) {
|
||||
_maxUsedThemes = DEFAULT_MAX_USED_THEMES_COUNT;
|
||||
}
|
||||
_maxUsedThemes = _prefs.getIntPref(aData, DEFAULT_MAX_USED_THEMES_COUNT);
|
||||
|
||||
// Update the theme list to remove any themes over the number we keep
|
||||
_updateUsedThemes(LightweightThemeManager.usedThemes);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -179,12 +179,7 @@ var PrefObserver = {
|
|||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
}
|
||||
else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
|
||||
try {
|
||||
gDebugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
|
||||
}
|
||||
catch (e) {
|
||||
gDebugLogEnabled = false;
|
||||
}
|
||||
gDebugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED, false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -486,14 +486,7 @@ this.AddonRepository = {
|
|||
}
|
||||
|
||||
let preference = PREF_GETADDONS_CACHE_ENABLED;
|
||||
let enabled = false;
|
||||
try {
|
||||
enabled = Services.prefs.getBoolPref(preference);
|
||||
} catch(e) {
|
||||
logger.warn("cacheEnabled: Couldn't get pref: " + preference);
|
||||
}
|
||||
|
||||
return enabled;
|
||||
return Services.prefs.getBoolPref(preference, false);
|
||||
},
|
||||
|
||||
// A cache of the add-ons stored in the database
|
||||
|
|
@ -541,11 +534,7 @@ this.AddonRepository = {
|
|||
|
||||
metadataAge: function() {
|
||||
let now = Math.round(Date.now() / 1000);
|
||||
|
||||
let lastUpdate = 0;
|
||||
try {
|
||||
lastUpdate = Services.prefs.getIntPref(PREF_METADATA_LASTUPDATE);
|
||||
} catch (e) {}
|
||||
let lastUpdate = Services.prefs.getIntPref(PREF_METADATA_LASTUPDATE, 0);
|
||||
|
||||
// Handle clock jumps
|
||||
if (now < lastUpdate) {
|
||||
|
|
@ -555,10 +544,8 @@ this.AddonRepository = {
|
|||
},
|
||||
|
||||
isMetadataStale: function AddonRepo_isMetadataStale() {
|
||||
let threshold = DEFAULT_METADATA_UPDATETHRESHOLD_SEC;
|
||||
try {
|
||||
threshold = Services.prefs.getIntPref(PREF_METADATA_UPDATETHRESHOLD_SEC);
|
||||
} catch (e) {}
|
||||
let threshold = Services.prefs.getIntPref(PREF_METADATA_UPDATETHRESHOLD_SEC,
|
||||
DEFAULT_METADATA_UPDATETHRESHOLD_SEC);
|
||||
return (this.metadataAge() > threshold);
|
||||
},
|
||||
|
||||
|
|
@ -1543,10 +1530,8 @@ this.AddonRepository = {
|
|||
|
||||
// Create url from preference, returning null if preference does not exist
|
||||
_formatURLPref: function AddonRepo_formatURLPref(aPreference, aSubstitutions) {
|
||||
let url = null;
|
||||
try {
|
||||
url = Services.prefs.getCharPref(aPreference);
|
||||
} catch(e) {
|
||||
let url = Services.prefs.getCharPref(aPreference, "");
|
||||
if (!url) {
|
||||
logger.warn("_formatURLPref: Couldn't get pref: " + aPreference);
|
||||
return null;
|
||||
}
|
||||
|
|
@ -1639,10 +1624,7 @@ var AddonDatabase = {
|
|||
// Create a blank addons.json file
|
||||
this._saveDBToDisk();
|
||||
|
||||
let dbSchema = 0;
|
||||
try {
|
||||
dbSchema = Services.prefs.getIntPref(PREF_GETADDONS_DB_SCHEMA);
|
||||
} catch (e) {}
|
||||
let dbSchema = Services.prefs.getIntPref(PREF_GETADDONS_DB_SCHEMA, 0);
|
||||
|
||||
if (dbSchema < DB_MIN_JSON_SCHEMA) {
|
||||
let results = yield new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -608,12 +608,7 @@ function UpdateParser(aId, aUpdateKey, aUrl, aObserver) {
|
|||
this.observer = aObserver;
|
||||
this.url = aUrl;
|
||||
|
||||
let requireBuiltIn = true;
|
||||
try {
|
||||
requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
let requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, true);
|
||||
|
||||
logger.debug("Requesting " + aUrl);
|
||||
try {
|
||||
|
|
@ -651,12 +646,7 @@ UpdateParser.prototype = {
|
|||
this.request = null;
|
||||
this._doneAt = new Error("place holder");
|
||||
|
||||
let requireBuiltIn = true;
|
||||
try {
|
||||
requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS);
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
let requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, true);
|
||||
|
||||
try {
|
||||
CertUtils.checkCert(request.channel, !requireBuiltIn);
|
||||
|
|
|
|||
|
|
@ -1410,10 +1410,7 @@ this.XPIDatabase = {
|
|||
// when a lightweight theme is applied for example)
|
||||
text += "\r\n[ThemeDirs]\r\n";
|
||||
|
||||
let dssEnabled = false;
|
||||
try {
|
||||
dssEnabled = Services.prefs.getBoolPref(PREF_EM_DSS_ENABLED);
|
||||
} catch (e) {}
|
||||
let dssEnabled = Services.prefs.getBoolPref(PREF_EM_DSS_ENABLED, false);
|
||||
|
||||
let themes = [];
|
||||
if (dssEnabled) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue