Closed Bug 95534 Opened 24 years ago Closed 24 years ago

JSTRAP_CONTINUE doesn't

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: rginda, Assigned: rginda)

Details

Attachments

(1 file)

Build the jsdb shell, load a .js file containing the following script: function toCall() { var a = 0; debugger; var b = 20; } toCall(); When the debugger breaks, type ``show("c+d")'' You'll crash in jsinterp.c, trying to add two bogus slots. Brendan discovered the problem to be that the JSTRAP_CONTINUE case of the switch at line 3730 of jsinterp.c blows off the exception and sets ok to true, instead of letting the exception bubble (as I believe it should.) Patch coming up.
Attached patch patch, round oneSplinter Review
r=rginda jband/shaver, care sr= this?
Status: NEW → ASSIGNED
Why did that goto no_catch; line diff? Oh, you added trailing whitespace to the line under JSTRAP_ERROR -- please fix and r=brendan@mozilla.org. Shaver'll sr, I'm sure. /be
My original intention was to do what the code looks like it is trying to do: allow the debugger to detect the exception and tell the engine to just pretend that an execption was not raised. I'll buy the idea that this is not a reasonable thing to expect the engine to be able to do - since the code raising the exception may not have left things in a state where the next instruction can be executed as if nothing had gone wrong. So, having JSTRAP_CONTINUE mean "do what you would have done if the hook had not been called" is the Right Thing. sr=jband
Oh, and thanks for fixing my broken code!
extra whitespace removed, fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: