Closed
Bug 96514
Opened 24 years ago
Closed 24 years ago
Getting a nonexistent pref should not stuff bogus value into result
Categories
(Core :: Preferences: Backend, defect)
Core
Preferences: Backend
Tracking
()
VERIFIED
FIXED
mozilla0.9.4
People
(Reporter: ccarlen, Assigned: bnesse)
Details
Attachments
(1 file)
1.70 KB,
patch
|
Details | Diff | Splinter Review |
This is a problem is where somebody uses code like this (very common):
PRBool paintFrameCounts = PR_FALSE;
prefs->GetBoolPref("layout.reflow.showframecounts", &paintFrameCounts);
without checking the result code. It assumes that, if the pref does not exist,
the PRBool param it passed will be untouched. That's why it initialized it
beforehand. Reasonable. That's what I'd expect. Unfortunately, if the pref in
question has had its user value reset, which happens in profile switching, a
bogus value will be returned.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
This blocks bug 86021. If I can get it reviewed an in today... It's extremely
low risk. Chris, can you sr=?
Blocks: 86021
Assignee | ||
Comment 3•24 years ago
|
||
Looks like what we discussed. r=bnesse.
Reporter | ||
Comment 4•24 years ago
|
||
While this is a serious problem and should be checked in ASAP anyway, it appears
to no longer be blocking bug 86021. On testing that patch without this one over
the past 2 days, the problem this bug causes has mysteriously disappeared.
Removing blockage.
No longer blocks: 86021
Comment 5•24 years ago
|
||
sr=sfraser
a=dbaron (on behalf of drivers)
Assignee | ||
Comment 7•24 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•