Issue #991 Part 7: Toolkit Components

This commit is contained in:
Ascrod 2019-04-13 10:53:58 -04:00 • committed by Roy Tam
commit e309515e66
18 changed files with 55 additions and 204 deletions

View file

@ -812,11 +812,8 @@ nsPlacesExpiration.prototype = {
_loadPrefs: Task.async(function* () {
// Get the user's limit, if it was set.
try {
// We want to silently fail since getIntPref throws if it does not exist,
// and use a default to fallback to.
this._urisLimit = this._prefBranch.getIntPref(PREF_MAX_URIS);
} catch (ex) { /* User limit not set */ }
this._urisLimit = this._prefBranch.getIntPref(PREF_MAX_URIS,
PREF_MAX_URIS_NOTSET);
if (this._urisLimit < 0) {
// Some testing code expects a pref change to be synchronous, so
@ -874,11 +871,8 @@ nsPlacesExpiration.prototype = {
this._urisLimit);
// Get the expiration interval value.
try {
// We want to silently fail since getIntPref throws if it does not exist,
// and use a default to fallback to.
this._interval = this._prefBranch.getIntPref(PREF_INTERVAL_SECONDS);
} catch (ex) { /* User interval not set */ }
this._interval = this._prefBranch.getIntPref(PREF_INTERVAL_SECONDS,
PREF_INTERVAL_SECONDS_NOTSET);
if (this._interval <= 0) {
this._interval = PREF_INTERVAL_SECONDS_NOTSET;
}