summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/nsPlacesExpiration.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/places/nsPlacesExpiration.js')
-rw-r--r--toolkit/components/places/nsPlacesExpiration.js14
1 files changed, 4 insertions, 10 deletions
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;
}