Bug 1568740 - (part 8) Add a test r=jonco
authorPaul Bone <pbone@mozilla.com>
Mon, 05 Aug 2019 07:02:32 +0000
changeset 486151 d681969e4480a2cad692be94adcbc2b861efb723
parent 486150 7ec72ad52389cffeb77423d1f9a0ee327ca94b7c
child 486152 836310e3d3ee2043feb41480a239a657ea7cf0cc
child 486219 98ed37257810426ad50df90fd9ca5361f92da36f
push id36390
push usercbrindusan@mozilla.com
push dateMon, 05 Aug 2019 09:54:13 +0000
treeherdermozilla-central@d681969e4480 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1568740
milestone70.0a1
first release with
nightly linux32
d681969e4480 / 70.0a1 / 20190805095413 / files
nightly linux64
d681969e4480 / 70.0a1 / 20190805095413 / files
nightly mac
d681969e4480 / 70.0a1 / 20190805095413 / files
nightly win32
d681969e4480 / 70.0a1 / 20190805095413 / files
nightly win64
d681969e4480 / 70.0a1 / 20190805095413 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1568740 - (part 8) Add a test r=jonco Differential Revision: https://phabricator.services.mozilla.com/D39993
js/src/jit-test/tests/gc/bug-1568740.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/gc/bug-1568740.js
@@ -0,0 +1,20 @@
+gczeal(0);
+
+function setAndTest(param, value) {
+  gcparam(param, value);
+  assertEq(gcparam(param), value);
+}
+
+
+// Set a large nursery size.
+setAndTest("maxNurseryBytes", 1024*1024);
+setAndTest("minNurseryBytes", 1024*1024);
+minorgc();
+assertEq(gcparam("nurseryBytes"), 1024*1024);
+
+// Force it to shrink by more then one half.
+setAndTest("minNurseryBytes", 64*1024);
+setAndTest("maxNurseryBytes", 64*1024);
+minorgc();
+assertEq(gcparam("nurseryBytes"), 64*1024);
+