Open Bug 1514612 Opened 6 years ago Updated 6 years ago

Pass default to GetIntPref/GetBoolPref/GetCharPref to avoid having to use try/catch

Categories

(SeaMonkey :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: iannbugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

If you pass a default value through to GetIntPref it should not throw, so try/catch is not needed. One set of places I've seen it can be done is for flashCount in https://dxr.mozilla.org/comm-central/source/comm/suite/components/nsSuiteGlue.js#1263 and https://dxr.mozilla.org/comm-central/source/comm/suite/components/downloads/content/treeView.js#310
The same theory is there for GetBoolPref and GetCharPref but need to check if there are any instances of try/catch around those.
Component: Download & File Handling → General
Summary: Pass default to GetIntPref to avoid having to use try/catch → Pass default to GetIntPref/GetBoolPref/GetCharPref to avoid having to use try/catch
Keywords: good-first-bug
Lets see if someone takes it and if not fix it ourself for 2.57 later
You need to log in before you can comment on or make changes to this bug.