Open
Bug 1607871
Opened 5 years ago
Updated 3 months ago
[jsdbg2] onStep handlers can fire for non-debuggee frames
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug)
Details
A frame's onStep
handler can fire even when the frame's global is not a debuggee, and the frame is dead:
var g = newGlobal({ newCompartment: true });
g.eval(`
function f() {
print("hi");
}
`);
var dbg1 = new Debugger(g);
var dbg2 = new Debugger(g);
dbg1.other = dbg2;
dbg2.other = dbg1;
dbg1.onEnterFrame = dbg2.onEnterFrame = function(frame) {
let other = this.other;
frame.onStep = function() {
print(this.callee.name);
other.removeDebuggee(g);
};
};
g.f();
This should print f
once and then exit, but instead it prints:
f
/home/jimb/moz/onstep.js:16:5 Error: Debugger.Frame is not on stack or suspended
Stack:
f@/home/jimb/moz/onstep.js line 2 > eval:3:5
@/home/jimb/moz/onstep.js:21:3
Updated•5 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
Updated•3 months ago
|
Blocks: js-debugger
You need to log in
before you can comment on or make changes to this bug.
Description
•