summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js
blob: 5104c52ee76cc91226b07a42833fba6594ea2c31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function testThrowingObjectEqUndefined()
{
  try
  {
    var obj = { toString: function() { throw 0; } };
    for (var i = 0; i < 5; i++)
      "" + (obj == undefined);
    return i === 5;
  }
  catch (e)
  {
    return "" + e;
  }
}
assertEq(testThrowingObjectEqUndefined(), true);