summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js
blob: 495c3c9dbf2f93bd03ad6b777e6e12a2ee24e3ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

function A() {
    this.x = 12;
    this.y = function () { return this.x; };
    this[1] = function () { return this.x; };
}

function f(obj, key){
    assertEq(obj[key](), 12);
}

a = new A();
f(a, "y");
f(a, "y");
f(a, 1);
gc();
f(a, "y");
f(a, "y");