Closed
Bug 701274
Opened 13 years ago
Closed 13 years ago
JSD's jsd_ThrowHandler uses value from wrong enumeration
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: jimb, Assigned: jimb)
References
Details
(Whiteboard: [inbound])
Attachments
(1 file)
Although jsd_ThrowHandler is declared to return a JSTrapStatus --- as expected for functions used for JSDebugHooks::throwHook --- the code may actually return JSD_HOOK_RETURN_CONTINUE_THROW, which is not a valid JSTrapStatus value.
This turns out to not have any effect: the js/src code that calls throwHook happens to treat bogus JSTrapStatus values as equivalent to JSTRAP_CONTINUE, which is what jsd_ThrowHandler should be returning. And when there is a JSDContext::throwHook established, jsd_ThrowHandler passes through the return value of jsd_CallExecutionHook, which uses JSTrapStatus properly.
But I would like to tighten up js/src to check that hooks return valid JSTrapStatus values, so I would like to fix jsd_ThrowHandler.
Assignee | ||
Comment 1•13 years ago
|
||
(Simple patch forthcoming...)
Assignee | ||
Comment 2•13 years ago
|
||
The try server is evaluating this patch, along with the patches for bug 687683 and bug 700070, here:
https://tbpl.mozilla.org/?tree=Try&rev=ec00649f1af6
Assignee | ||
Updated•13 years ago
|
Attachment #574006 -
Flags: review?(sphink)
Assignee | ||
Comment 3•13 years ago
|
||
Try server liked it, so here you go.
Updated•13 years ago
|
Attachment #574006 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Status: NEW → ASSIGNED
Whiteboard: [inbound]
Comment 5•13 years ago
|
||
Assignee: general → jimb
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in
before you can comment on or make changes to this bug.
Description
•