blob: 83793a73060393170db0eef458dd82dfc9dc5571 (
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: !hasFunction.oomAfterAllocations
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");
} + ")();");
|