Closed
Bug 224254
Opened 21 years ago
Closed 21 years ago
make CSS parser use nsresult for |aErrorCode|
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.6beta
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Whiteboard: [patch])
Attachments
(1 file)
95.12 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
The CSS parser has long had a TODO comment that it should use nsresult for its |aErrorCode| values. The following patch is largely the result of: s/PRInt32& aErrorCode/nsresult& aErrorCode/ s/PRInt32 errorCode/nsresult errorCode/ but also: * removes three checks for -1 error code meaning EOF and replaces them with assertions, since I can't find any place that sets the error code to -1 on EOF * removes the TODO comment
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Comment 2•21 years ago
|
||
I tested that the "test styles" bookmarklet at http://www.squarefree.com/bookmarklets/webdevel.html still works as I type.
Assignee | ||
Comment 3•21 years ago
|
||
(I should really do that in a debug build, though.)
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: [patch]
Target Milestone: --- → mozilla1.6beta
Comment 4•21 years ago
|
||
Are the callers who used to check for -1 likely to throw exceptions on EOF when we don't want them to? (I guess no, since the scanner does not set rv to -1 on EOF....)
Assignee | ||
Comment 5•21 years ago
|
||
No assertions in the same test in a debug build, so I don't think anything is returning -1 in aErrorCode for EOF.
Assignee | ||
Updated•21 years ago
|
Attachment #134542 -
Flags: superreview?(bz-vacation)
Attachment #134542 -
Flags: review?(bz-vacation)
Comment 6•21 years ago
|
||
I'll try to get to this sometime this week...
Comment 7•21 years ago
|
||
Comment on attachment 134542 [details] [diff] [review] patch r+sr=bzbarsky; I'm sorry this took so long... The EOF thing is indeed not a -1 anymore, since we just use rv from the stream for that error code, and streams return NS_OK and 0 bytes for a read at EOF.
Attachment #134542 -
Flags: superreview?(bz-vacation)
Attachment #134542 -
Flags: superreview+
Attachment #134542 -
Flags: review?(bz-vacation)
Attachment #134542 -
Flags: review+
Assignee | ||
Comment 8•21 years ago
|
||
Fix checked in to trunk, 2003-11-13 14:48 -0800.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•