From 714e9c9074d9eb2f4063962d07bae6b4f02a1e7a Mon Sep 17 00:00:00 2001 From: Ascrod <32915892+Ascrod@users.noreply.github.com> Date: Sat, 13 Apr 2019 10:53:58 -0400 Subject: Issue #991 Part 7: Toolkit Components --- toolkit/components/places/nsPlacesExpiration.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'toolkit/components/places/nsPlacesExpiration.js') diff --git a/toolkit/components/places/nsPlacesExpiration.js b/toolkit/components/places/nsPlacesExpiration.js index 499934362..767a4d345 100644 --- a/toolkit/components/places/nsPlacesExpiration.js +++ b/toolkit/components/places/nsPlacesExpiration.js @@ -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; } -- cgit v1.2.3