Debian Codegraph @

js/src/jit-test/tests/debug/Debugger-findScripts-27.js

raw
1 // |jit-test| skip-if: isLcovEnabled()
2 var g = newGlobal({newCompartment: true});
3 var dbg = new Debugger();
4 var gw = dbg.addDebuggee(g);
5
6 g.eval(`
7 function f() {
8 function inner() {
9 var x;
10 }
11 }
12 `);
13
14 // GC will collect top-level script of the eval
15 gc();
16 gc();
17
18 let url = thisFilename();
19 let line = 4;
20
21 // Function `f` and `inner` should still match
22 assertEq(dbg.findScripts({url, line}).length, 2);