summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Source-invisible.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/debug/Source-invisible.js')
-rw-r--r--js/src/jit-test/tests/debug/Source-invisible.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Source-invisible.js b/js/src/jit-test/tests/debug/Source-invisible.js
new file mode 100644
index 000000000..277c32459
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Source-invisible.js
@@ -0,0 +1,12 @@
+// Looking at ScriptSourceObjects in invisible-to-debugger compartments is okay.
+
+var gi = newGlobal({ invisibleToDebugger: true });
+gi.eval('function f() {}');
+
+var gv = newGlobal();
+gv.f = gi.f;
+gv.eval('f = clone(f);');
+
+var dbg = new Debugger;
+var gvw = dbg.addDebuggee(gv);
+gvw.getOwnPropertyDescriptor('f').value.script.source;