blob: 3f02a6c382d1c1add594f69039511df5b081ca90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Setting a breakpoint in a non-debuggee Script is an error.
load(libdir + "asserts.js");
var g1 = newGlobal();
var g2 = g1.eval("newGlobal('same-compartment')");
g2.eval("function f() { return 2; }");
g1.f = g2.f;
var dbg = Debugger(g1);
var s;
dbg.onDebuggerStatement = function (frame) { s = frame.eval("f").return.script; };
g1.eval("debugger;");
assertThrowsInstanceOf(function () { s.setBreakpoint(0, {}); }, Error);
|