summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ctypes/bug1155985.js
blob: 54c24d4badfeccf1597b53f12a61a4d7a3076760 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function test() {
  for (let i = 0; i < 100; i++) {
    let test_struct = ctypes.StructType("test_struct", [{ "x": ctypes.int32_t },
                                                        { "bar": ctypes.uint32_t }]);

    try {
      new test_struct("foo", "x");
    } catch (e) {
    }
  }
}

if (typeof ctypes === "object")
  test();