diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/bug1147216.js')
-rw-r--r-- | js/src/jit-test/tests/basic/bug1147216.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug1147216.js b/js/src/jit-test/tests/basic/bug1147216.js new file mode 100644 index 000000000..d683d713f --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1147216.js @@ -0,0 +1,25 @@ +// Ensure JSOP_LINENO (emitted after JSOP_EVAL) handles big line +// numbers correctly. +function getsource() { + var s = ""; + for (var i=0; i<66002; i++) { + s += "\n"; + if (i === 66000) + s += "eval('stack = Error().stack');"; + } + return s; +} +function test() { + var stack; + eval(getsource()); + assertEq(stack.indexOf("line 66002") > 0, true); +} +test(); + +function testStrict() { + "use strict"; + var stack; + eval(getsource()); + assertEq(stack.indexOf("line 66002") > 0, true); +} +testStrict(); |