summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1017141.js
blob: 9c4533924ca06622370232e3551655b14536b502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var min = gcparam('minEmptyChunkCount');
var max = gcparam('maxEmptyChunkCount');

gcparam('minEmptyChunkCount', 10);
gcparam('maxEmptyChunkCount', 20);
assertEq(gcparam('minEmptyChunkCount'), 10);
assertEq(gcparam('maxEmptyChunkCount'), 20);
gc();

/* We maintain the invariant that maxEmptyChunkCount >= minEmptyChunkCount. */
gcparam('minEmptyChunkCount', 30);
assertEq(gcparam('minEmptyChunkCount'), 30);
assertEq(gcparam('maxEmptyChunkCount'), 30);
gc();

gcparam('maxEmptyChunkCount', 5);
assertEq(gcparam('minEmptyChunkCount'), 5);
assertEq(gcparam('maxEmptyChunkCount'), 5);
gc();

gcparam('minEmptyChunkCount', min);
gcparam('maxEmptyChunkCount', max);
assertEq(gcparam('minEmptyChunkCount'), min);
assertEq(gcparam('maxEmptyChunkCount'), max);
gc();