Closed Bug 701274 Opened 12 years ago Closed 12 years ago
_Throw Handler uses value from wrong enumeration
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.
(Simple patch forthcoming...)
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
Try server liked it, so here you go.
Attachment #574006 - Flags: review?(sphink) → review+
Status: NEW → ASSIGNED
Assignee: general → jimb
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.