summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/sharedbuf/gc-two-views.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/sharedbuf/gc-two-views.js')
-rw-r--r--js/src/jit-test/tests/sharedbuf/gc-two-views.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/sharedbuf/gc-two-views.js b/js/src/jit-test/tests/sharedbuf/gc-two-views.js
new file mode 100644
index 000000000..b130092c5
--- /dev/null
+++ b/js/src/jit-test/tests/sharedbuf/gc-two-views.js
@@ -0,0 +1,11 @@
+// Test tracing of two views of a SharedArrayBuffer. Uses a different path.
+
+function f() {
+ var x = new SharedArrayBuffer(0x1000);
+ var y = new Int32Array(x);
+ var z = new Int8Array(x);
+ gc();
+}
+
+if (this.SharedArrayBuffer)
+ f();