summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/tests/unit/test_000_frecency.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/places/tests/unit/test_000_frecency.js')
-rw-r--r--toolkit/components/places/tests/unit/test_000_frecency.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/toolkit/components/places/tests/unit/test_000_frecency.js b/toolkit/components/places/tests/unit/test_000_frecency.js
index 0a7347a02..64ee86b59 100644
--- a/toolkit/components/places/tests/unit/test_000_frecency.js
+++ b/toolkit/components/places/tests/unit/test_000_frecency.js
@@ -56,14 +56,8 @@ var prefPrefix = "places.frecency.";
function* task_initializeBucket(bucket) {
let [cutoffName, weightName] = bucket;
// get pref values
- var weight = 0, cutoff = 0;
- try {
- weight = prefs.getIntPref(prefPrefix + weightName);
- } catch (ex) {}
- try {
- cutoff = prefs.getIntPref(prefPrefix + cutoffName);
- } catch (ex) {}
-
+ var weight = prefs.getIntPref(prefPrefix + weightName, 0);
+ var cutoff = prefs.getIntPref(prefPrefix + cutoffName, 0);
if (cutoff < 1)
return;