Debian Codegraph @

js/src/jit-test/tests/debug/Debugger-findObjects-classObj-incompatible.js

raw
1 load(libdir + 'asserts.js');
2
3 const g = newGlobal({ newCompartment: true });
4
5 g.eval(`
6 var arr = [];
7 `);
8
9 const dbg = new Debugger();
10
11 // The query should be Debugger.Object
12 assertThrowsInstanceOf(() => {
13 dbg.findObjects({ class: g.Array });
14 }, TypeError);
15 assertThrowsInstanceOf(() => {
16 dbg.findObjects({ class: g.arr });
17 }, TypeError);
18 assertThrowsInstanceOf(() => {
19 dbg.findObjects({ class: null });
20 }, TypeError);
21 assertThrowsInstanceOf(() => {
22 dbg.findObjects({ class: {} });
23 }, TypeError);