summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1252103.js
blob: 7c2bc361b473e363451fc12b1b1afff326e788e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Bug 1252103: Inline typed array objects need delayed metadata collection.
// Shouldn't crash.

if (!this.hasOwnProperty("TypedObject"))
  quit();

function foo() {
    enableTrackAllocations();
    gczeal(2, 10);
    TO = TypedObject;
    PointType = new TO.StructType({
        y: TO.float64,
        name: TO.string
    })
    LineType = new TO.StructType({
        PointType
    })
    function testBasic() new LineType;
    testBasic();
}
evaluate("foo()");