Closed Bug 830885 Opened 7 years ago Closed 7 years ago

Factor out interpreter/debugger exception unwinding code

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
The attached patch moves the interpreter code to invoke throw/exceptionUnwind hooks to a new function DebugExceptionUnwind, so that the baseline compiler can reuse it.
Attachment #702425 - Flags: review?(jorendorff)
Comment on attachment 702425 [details] [diff] [review]
Patch

Review of attachment 702425 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the one comment addressed.

::: js/src/jsinterp.cpp
@@ +3576,5 @@
>      JS_ASSERT(interpMode != JSINTERP_REJOIN);
>  
>      if (cx->isExceptionPending()) {
> +        /* Call debugger throw hooks. */
> +        if (cx->compartment->debugMode()) {

The old code didn't check this. Is this a behavior change? I guess not in practice? Fine with me, if so.
Attachment #702425 - Flags: review?(jorendorff) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/9ca1e2e40a06

(In reply to Jason Orendorff [:jorendorff] from comment #1)
> 
> The old code didn't check this. Is this a behavior change? I guess not in
> practice? Fine with me, if so.

Yeah looking at the places where we set throw hooks it's not a problem. (FWIW, if it was, it would also break with IonMonkey, it doesn't call any throw hooks when propagating exceptions.)
https://hg.mozilla.org/mozilla-central/rev/9ca1e2e40a06
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.