Closed
Bug 492491
Opened 15 years ago
Closed 15 years ago
nanojit: convert some error() tests to asserts
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
999 bytes,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
In pageValidate() and resourceConsistencyCheck(), abort on prior error, rather than skipping. This establishes an invariant -- prior error should be impossible due to the calling context.
Attachment #376860 -
Flags: review?(edwsmith)
Comment 1•15 years ago
|
||
is this valid for all the possible ways error() can be set? (out of memory, stackfull, etc?)
Assignee | ||
Comment 2•15 years ago
|
||
It's valid. Both functions only have one calling context, which looks like this: if (error()) return; // check that all is well (don't check in exit paths since its more complicated) debug_only( pageValidate(); ) debug_only( resourceConsistencyCheck(); )
Assignee | ||
Comment 3•15 years ago
|
||
I should add the reason for this change. It's because the use of the Assembler._err field, accessed through the error() and setError() methods, is very confusing, and this ties in with the difficulties of OOM handling. Converting these two cases to assertions effectively removed two uses of error(), and so made a small step towards simplifying the error handling.
Comment 4•15 years ago
|
||
Comment on attachment 376860 [details] [diff] [review] patch that converts some error() tests to asserts cool
Attachment #376860 -
Flags: review?(edwsmith) → review+
Comment 5•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/b76004a6fae3
Whiteboard: fixed-in-tracemonkey
Comment 6•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b76004a6fae3
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•