summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug799185-8.js
blob: b84bcab9ee50a37318b966b63c5b01c9efdb7ae5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// |jit-test| error: TypeError
function testBitOrInconvertibleObjectInconvertibleObject() {
  var o1 = {};
  var count2 = 0;
  function toString2() {
        ++count2;
        if (count2 == 95) return {};
  }
  var o2 = { toString: toString2 };
  try {
    for (var i = 0; i < 100; i++)
        var q = o1 | o2;
  } catch (e)  {
    if (i !== 94)
      return gc();
    this.bar.foo ^ this
  }
}
testBitOrInconvertibleObjectInconvertibleObject()