diff options
Diffstat (limited to 'js/src/jit-test/tests/jaeger/testBug550743.js')
-rw-r--r-- | js/src/jit-test/tests/jaeger/testBug550743.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/testBug550743.js b/js/src/jit-test/tests/jaeger/testBug550743.js new file mode 100644 index 000000000..50349d6a3 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testBug550743.js @@ -0,0 +1,21 @@ +expected = ''; + +function g(code) { + f = Function(code); + gen = f(); + gen.next(); + try { gen.next(); } catch (ex) { expected = ex.toString() } +} + +g("\ + yield this.__defineGetter__('x', function(){ return z }); \ + let z = new String('hi'); \ + "); + +eval(); +gc(); + +str = x; + +assertEq(expected, "[object StopIteration]"); +assertEq(str.toString(), "hi"); |