Closed
Bug 1108168
Opened 11 years ago
Closed 11 years ago
nsSearchService's getBoolPref triggers exceptions (and catches them), which is noisy for debuggers
Categories
(Firefox :: Search, defect)
Firefox
Search
Tracking
()
RESOLVED
FIXED
Firefox 37
People
(Reporter: WeirdAl, Assigned: WeirdAl)
Details
(Whiteboard: debugging-noise)
Attachments
(1 file, 1 obsolete file)
|
1.32 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
Our company's XUL app, run with firefox --app, doesn't have a lot of search preferences defined.
Attachment #8532744 -
Flags: review?(gavin.sharp)
Comment 1•11 years ago
|
||
Comment on attachment 8532744 [details] [diff] [review]
nsSearchService.js
> function getBoolPref(aName, aDefault) {
>+ if (Services.prefs.getPrefType(aName) != Ci.nsIPrefBranch.PREF_BOOL)
>+ return aName;
> try {
> return Services.prefs.getBoolPref(aName);
> } catch (ex) {
> return aDefault;
> }
> }
Returning aName doesn't seem to make any sense. Also, with this check added, the try/catch can go away, right?
Attachment #8532744 -
Flags: review?(gavin.sharp) → review-
| Assignee | ||
Comment 2•11 years ago
|
||
Whoops, I clearly meant aDefault! Yes, the try... catch can go away.
| Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8532744 -
Attachment is obsolete: true
Attachment #8533306 -
Flags: review?(dao)
Updated•11 years ago
|
Attachment #8533306 -
Flags: review?(dao) → review+
| Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8533306 [details] [diff] [review]
nsSearchService.js.diff
I presume the code for search is fairly well tested...
Attachment #8533306 -
Flags: checkin?(dao)
Updated•11 years ago
|
Comment 5•11 years ago
|
||
can we get a try run for this change, thanks!
Flags: needinfo?(ajvincent)
Keywords: checkin-needed
Updated•11 years ago
|
Attachment #8533306 -
Flags: checkin?(dao)
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Updated•9 years ago
|
Flags: needinfo?(ajvincent)
You need to log in
before you can comment on or make changes to this bug.
Description
•