summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Source-invisible.js
blob: 5c84fa880bcf3c86133987b79d7f4dd0b24ad7de (plain)
1
2
3
4
5
6
7
8
9
10
// Looking at ScriptSourceObjects in invisible-to-debugger compartments is okay.

var gi = newGlobal({ newCompartment: true, invisibleToDebugger: true });

var gv = newGlobal({newCompartment: true});
gi.evaluate('function f() {}', {global: gv});

var dbg = new Debugger;
var gvw = dbg.addDebuggee(gv);
gvw.getOwnPropertyDescriptor('f').value.script.source;