summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/closure-03.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/jaeger/closure-03.js')
-rw-r--r--js/src/jit-test/tests/jaeger/closure-03.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/closure-03.js b/js/src/jit-test/tests/jaeger/closure-03.js
new file mode 100644
index 0000000000..e2d1ebe3f8
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/closure-03.js
@@ -0,0 +1,15 @@
+
+/* Recovering non-reentrant information on singletons after a GC. */
+
+function foo(a) {
+ return function() {
+ gc();
+ var n = 0;
+ for (var i = 0; i < 20; i++)
+ n = a++;
+ assertEq(n, 29);
+ };
+}
+var a = foo(10);
+var b = foo(20);
+a();