Debian Codegraph @

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

raw
1 // |jit-test| skip-if: isLcovEnabled()
2
3 // If the specified line is the next line after the function,
4 // the function shouldn't match.
5
6 var g = newGlobal({newCompartment: true});
7 var dbg = new Debugger();
8 var gw = dbg.addDebuggee(g);
9
10 g.eval(`
11 function f() {
12 }
13 `);
14
15 gc();
16 gc();
17
18 let url = thisFilename();
19
20 assertEq(dbg.findScripts({url, line: 3}).length, 1);
21 assertEq(dbg.findScripts({url, line: 4}).length, 0);