Debian Codegraph @

js/src/jit-test/tests/debug/bug1245862.js

raw
1 // |jit-test| allow-oom; skip-if: !hasFunction.oomAfterAllocations
2
3 var g = newGlobal({newCompartment: true});
4 var dbg = new Debugger;
5 g.h = function h(d) {
6 if (d) {
7 dbg.addDebuggee(g);
8 var f = dbg.getNewestFrame().older;
9 f.st_p1((oomAfterAllocations(10)) + "foo = 'string of 42'");
10 }
11 }
12 g.eval("" + function f(d) {
13 g(d);
14 });
15 g.eval("" + function g(d) {
16 h(d);
17 });
18 g.eval("(" + function () {
19 for (i = 0; i < 5; i++)
20 f(false);
21 assertEq(f(true), "string of 42");
22 } + ")();");