blob: ce582cb2146051cd143bae5160a9bee103366b08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Setting a breakpoint in a script we are no longer debugging is an error.
load(libdir + "asserts.js");
var g = newGlobal({newCompartment: true});
var dbg = Debugger();
var gobj = dbg.addDebuggee(g);
g.eval("function f() { return 2; }");
var s;
dbg.onDebuggerStatement = function (frame) { s = frame.eval("f").return.script; };
g.eval("debugger;");
s.setBreakpoint(0, {}); // ok
dbg.removeDebuggee(gobj);
assertThrowsInstanceOf(function () { s.setBreakpoint(0, {}); }, Error);
|