summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/makeGlobalObjectReference-03.js
blob: b20cadb8ecabc2888d2f5ec6e5277dba7d9318e1 (plain)
1
2
3
4
5
6
7
8
// Debugger.prototype.makeGlobalObjectReference should not accept invisible-to-debugger globals.
load(libdir + 'asserts.js');

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

assertThrowsInstanceOf(function () {
  (new Debugger).makeGlobalObjectReference(g)
}, TypeError);