summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/TypedObject/bug969159.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/TypedObject/bug969159.js')
-rw-r--r--js/src/jit-test/tests/TypedObject/bug969159.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/TypedObject/bug969159.js b/js/src/jit-test/tests/TypedObject/bug969159.js
new file mode 100644
index 000000000..18534a609
--- /dev/null
+++ b/js/src/jit-test/tests/TypedObject/bug969159.js
@@ -0,0 +1,9 @@
+// Test access to a 0-sized element (in this case,
+// a zero-length array).
+
+if (!this.hasOwnProperty("TypedObject"))
+ quit();
+
+var AA = TypedObject.uint8.array(0.).array(5);
+var aa = new AA();
+var aa0 = aa[0];