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)
SeaMonkey
General
Tracking
(Not tracked)
NEW
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
Comment 2•6 years ago
|
||
Lets see if someone takes it and if not fix it ourself for 2.57 later
Blocks: 2.57BulkMalfunctions
Some more potential examples: https://dxr.mozilla.org/comm-central/source/comm/suite/browser/nsBrowserContentHandler.js#83 https://dxr.mozilla.org/comm-central/source/comm/suite/browser/nsBrowserContentHandler.js#100 https://dxr.mozilla.org/comm-central/source/comm/suite/browser/nsBrowserContentHandler.js#182 https://dxr.mozilla.org/comm-central/source/comm/suite/browser/pageinfo/permissions.js#44
Probably this one too: https://dxr.mozilla.org/comm-central/source/comm/suite/base/content/utilityOverlay.js#222
You need to log in
before you can comment on or make changes to this bug.
Description
•