[jsdbg2] Assertion failure: throwing, at jscntxt.h:1274

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
critical
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: decoder, Assigned: jorendorff)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Other Branch
x86_64
Linux
assertion, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
The following code asserts on jsdbg2 branch (revision 82545b1e4129, options -j -m -d -a):


var g = newGlobal('new-compartment');
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () {};");
var g = newGlobal('new-compartment');
g.eval("function f(n) { if (n) f(n - 1); debugger; }");
var dbg = new Debugger(g);
dbg.onDebuggerStatement = function (frame) {
    if (hits === 1) { }
};
g.f(20);
(Assignee)

Comment 1

7 years ago
Created attachment 551608 [details] [diff] [review]
v1

A self-inflicto.
Assignee: general → jorendorff
Attachment #551608 - Flags: review?(jimb)

Comment 2

7 years ago
Comment on attachment 551608 [details] [diff] [review]
v1

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

::: js/src/jit-test/tests/debug/onExceptionUnwind-07.js
@@ +5,5 @@
> +var hits = 0;
> +dbg.onExceptionUnwind = function (frame, value) { hits = 'BAD'; };
> +dbg.onDebuggerStatement = function (frame) {
> +    if (hits++ === 0)
> +	assertEq(frame.eval("debugger;"), null);

I figured out that 'eval("debugger;")' will return undefined, but it might be more obvious if this were 'eval("debugger; 2")'.
Attachment #551608 - Flags: review?(jimb) → review+
(Assignee)

Comment 3

7 years ago
frame.eval returns a completion value; the test asserts that the completion value is null, indicating an uncatchable error.

http://hg.mozilla.org/users/jblandy_mozilla.com/jsdbg2/rev/48e43edc8834
(Assignee)

Comment 4

7 years ago
http://hg.mozilla.org/mozilla-central/rev/48e43edc8834
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.