mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1192245 - Fix tests that fail with incremental zeal r=terrence
This commit is contained in:
parent
d5fcbaeb6a
commit
8d8140b91e
@ -1,6 +1,9 @@
|
||||
if (helperThreadCount() == 0)
|
||||
quit();
|
||||
|
||||
gczeal(0);
|
||||
gc();
|
||||
|
||||
schedulegc(this);
|
||||
startgc(0, "shrinking");
|
||||
var g = newGlobal();
|
||||
|
@ -8,8 +8,8 @@ if (!("startgc" in this &&
|
||||
if (helperThreadCount() == 0)
|
||||
quit();
|
||||
|
||||
if ("gczeal" in this)
|
||||
gczeal(0);
|
||||
gczeal(0);
|
||||
gc();
|
||||
|
||||
// Start an incremental GC that includes the atoms zone
|
||||
startgc(0);
|
||||
|
@ -1,2 +1,4 @@
|
||||
gczeal(0);
|
||||
gc();
|
||||
verifyprebarriers();
|
||||
gcparam('markStackLimit', 5);
|
||||
|
@ -1,3 +1,6 @@
|
||||
gczeal(0);
|
||||
gc();
|
||||
|
||||
var o = {};
|
||||
function foo() {
|
||||
var i = 0;
|
||||
|
@ -3,6 +3,9 @@
|
||||
if (!("gcstate" in this && "gczeal" in this && "abortgc" in this))
|
||||
quit();
|
||||
|
||||
gczeal(0);
|
||||
gc();
|
||||
|
||||
function testAbort(zoneCount, objectCount, sliceCount, abortState)
|
||||
{
|
||||
// Allocate objectCount objects in zoneCount zones and run a incremental
|
||||
|
@ -2,47 +2,48 @@
|
||||
* Test expected state changes during collection.
|
||||
*/
|
||||
|
||||
if ("gcstate" in this) {
|
||||
assertEq(gcstate(), "none");
|
||||
if (!("gcstate" in this))
|
||||
quit();
|
||||
|
||||
/* Non-incremental GC. */
|
||||
gc();
|
||||
assertEq(gcstate(), "none");
|
||||
gczeal(0);
|
||||
|
||||
/* Incremental GC in one slice. */
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "none");
|
||||
/* Non-incremental GC. */
|
||||
gc();
|
||||
assertEq(gcstate(), "none");
|
||||
|
||||
/*
|
||||
* Incremental GC in multiple slices: if marking takes more than one slice,
|
||||
* we yield before we start sweeping.
|
||||
*/
|
||||
gczeal(0);
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "none");
|
||||
/* Incremental GC in one slice. */
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "none");
|
||||
|
||||
/* Zeal mode 8: Incremental GC in two slices: 1) mark roots 2) finish collection. */
|
||||
gczeal(8);
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "none");
|
||||
/*
|
||||
* Incremental GC in multiple slices: if marking takes more than one slice,
|
||||
* we yield before we start sweeping.
|
||||
*/
|
||||
gczeal(0);
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "none");
|
||||
|
||||
/* Zeal mode 9: Incremental GC in two slices: 1) mark all 2) new marking and finish. */
|
||||
gczeal(9);
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "none");
|
||||
/* Zeal mode 8: Incremental GC in two slices: 1) mark roots 2) finish collection. */
|
||||
gczeal(8);
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "none");
|
||||
|
||||
/* Zeal mode 10: Incremental GC in multiple slices (always yeilds before sweeping). */
|
||||
gczeal(10);
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "sweep");
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "none");
|
||||
}
|
||||
/* Zeal mode 9: Incremental GC in two slices: 1) mark all 2) new marking and finish. */
|
||||
gczeal(9);
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "mark");
|
||||
gcslice(1);
|
||||
assertEq(gcstate(), "none");
|
||||
|
||||
/* Zeal mode 10: Incremental GC in multiple slices (always yeilds before sweeping). */
|
||||
gczeal(10);
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "sweep");
|
||||
gcslice(1000000);
|
||||
assertEq(gcstate(), "none");
|
||||
|
Loading…
Reference in New Issue
Block a user