Closed
Bug 414925
Opened 17 years ago
Closed 17 years ago
openPrefFile could fail to read all data
Categories
(Core :: Preferences: Backend, defect, P1)
Core
Preferences: Backend
Tracking
()
RESOLVED
INVALID
mozilla1.9beta3
People
(Reporter: MatsPalmgren_bugz, Assigned: jimm)
References
Details
(Keywords: regression)
I think this code could fail to read all data in the file: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/modules/libpref/src/nsPrefService.cpp&rev=1.102&root=/cvsroot&mark=612#585 since you can get less than what you request: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/xpcom/io/nsIInputStream.idl&rev=3.17&root=/cvsroot&mark=136,145#129 AFAICT, we really need a loop there, although you can still parse it in one pass after you have all the data of course.
Updated•17 years ago
|
Component: General → Preferences: Backend
Flags: blocking1.9?
QA Contact: general → prefs
Updated•17 years ago
|
Target Milestone: --- → mozilla1.9beta3
Assignee | ||
Comment 1•17 years ago
|
||
Ok, so we have to loop once to be sure the number of bytes read is zero on the second call. It might not, but usually it will be. It seemed there was an added performance hit from the reiterative calls into the parser, so I was trying to avoid that. Sounds like with this change we would still get the gains 99% of the time.
Comment 2•17 years ago
|
||
We should fix this before b3...
Assignee: nobody → jmathies
Flags: blocking1.9? → blocking1.9+
Priority: -- → P1
Assignee | ||
Comment 3•17 years ago
|
||
I believe the plan is to pull it since some folks had some suggestions on how to better implement it, which would then require retesting to see if we get any gains.
Comment 4•17 years ago
|
||
I backed the offending patch out.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•