summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug-1385844.js
blob: 3f40803a076dc95f4447ad67212b874aaf8d7091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Frame invalidatation should not follow 'debugger eval prev' links.
// This should not fail a 'frame.isDebuggee()' assertion.

var g1 = this;

var h = newGlobal({ newCompartment: true });
h.parent = g1;
h.eval(`
  var hdbg = new Debugger(parent);
  function j() {
    hdbg.onEnterFrame = function(frame) {};
  }
`);

var g2 = newGlobal({ newCompartment: true });
g2.j = h.j;

var dbg = new Debugger(g2);
var g2DO = dbg.addDebuggee(g2);

dbg.onDebuggerStatement = function(f) {
  f.eval('j()');
};
g2.eval('debugger');