diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js b/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js new file mode 100644 index 0000000000..5104c52ee7 --- /dev/null +++ b/js/src/jit-test/tests/basic/testThrowingObjectEqUndefined.js @@ -0,0 +1,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); |