summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1866540.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug1866540.js')
-rw-r--r--js/src/jit-test/tests/basic/bug1866540.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug1866540.js b/js/src/jit-test/tests/basic/bug1866540.js
new file mode 100644
index 0000000000..b02a80b63f
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug1866540.js
@@ -0,0 +1,10 @@
+// |jit-test| skip-if: helperThreadCount() === 0
+
+// On x86, MaxCodePages is 2240. Because we sometimes leave a one-page
+// gap, this will guarantee there are no free two-page chunks.
+for (var i = 0; i < 2200; i++) {
+ evalcx("function s(){}", evalcx('lazy'));
+}
+
+// Allocating trampolines for the JitRuntime requires two pages.
+evalInWorker("");