summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1543166.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/bug1543166.js')
-rw-r--r--js/src/jit-test/tests/ion/bug1543166.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/bug1543166.js b/js/src/jit-test/tests/ion/bug1543166.js
new file mode 100644
index 0000000000..ea67400c2b
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug1543166.js
@@ -0,0 +1,17 @@
+function f() {
+ var arr = [];
+ for (var i = 0; i < 12; i++) {
+ // Create a new global to get "DOM" objects with different groups.
+ var g = newGlobal();
+ var o = new g.FakeDOMObject();
+ o[0] = 1;
+ arr.push(o);
+ }
+ var res;
+ for (var i = 0; i < 2000; i++) {
+ var o = arr[i % arr.length];
+ res = o[0];
+ }
+ return res;
+}
+f();