summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1245862.js
blob: 274903bc403ad9863fc70659df1ffd9774ac4b08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)

var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
g.h = function h(d) {
  if (d) {
    dbg.addDebuggee(g);
    var f = dbg.getNewestFrame().older;
    f.st_p1((oomAfterAllocations(10)) + "foo = 'string of 42'");
  }
}
g.eval("" + function f(d) {
  g(d);
});
g.eval("" + function g(d) {
  h(d);
});
g.eval("(" + function () {
  for (i = 0; i < 5; i++)
    f(false);
  assertEq(f(true), "string of 42");
} + ")();");