summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/jaeger/testCallElemAfterGC.js')
-rw-r--r--js/src/jit-test/tests/jaeger/testCallElemAfterGC.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js b/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js
new file mode 100644
index 000000000..369aa2c6f
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js
@@ -0,0 +1,20 @@
+// vim: set ts=8 sts=4 et sw=4 tw=99:
+
+function A() {
+ this.x = 12;
+ this.y = function () { return this.x; };
+ this[1] = function () { return this.x; };
+}
+
+function f(obj, key){
+ assertEq(obj[key](), 12);
+}
+
+a = new A();
+f(a, "y");
+f(a, "y");
+f(a, 1);
+gc();
+f(a, "y");
+f(a, "y");
+