Debian Codegraph @

js/src/jit-test/tests/debug/Memory-drainAllocationsLog-13.js

raw
1 // |jit-test| skip-if: helperThreadCount() === 0
2
3 // Test that we don't crash while logging allocations and there is
4 // off-main-thread compilation. OMT compilation will allocate functions and
5 // regexps, but we just punt on measuring that accurately.
6
7 const root = newGlobal({newCompartment: true});
8 root.eval("this.dbg = new Debugger()");
9 root.dbg.addDebuggee(this);
10 root.dbg.memory.trackingAllocationSites = true;
11
12 offThreadCompileToStencil(
13 "function foo() {\n" +
14 " print('hello world');\n" +
15 "}"
16 );