mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 986843 - Don't sweep empty zones if they contain marked compartments r=terrence
This commit is contained in:
parent
df81b7d231
commit
5a83c0a822
@ -258,4 +258,12 @@ js::ZoneOfObjectFromAnyThread(const JSObject &obj)
|
||||
return obj.zoneFromAnyThread();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Zone::hasMarkedCompartments()
|
||||
{
|
||||
for (CompartmentsInZoneIter comp(this); !comp.done(); comp.next()) {
|
||||
if (comp->marked)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -317,6 +317,8 @@ struct Zone : public JS::shadow::Zone,
|
||||
|
||||
void sweep(js::FreeOp *fop, bool releaseTypes);
|
||||
|
||||
bool hasMarkedCompartments();
|
||||
|
||||
private:
|
||||
void sweepBreakpoints(js::FreeOp *fop);
|
||||
|
||||
|
@ -2864,7 +2864,9 @@ SweepZones(FreeOp *fop, bool lastGC)
|
||||
Zone *zone = *read++;
|
||||
|
||||
if (zone->wasGCStarted()) {
|
||||
if (zone->allocator.arenas.arenaListsAreEmpty() || lastGC) {
|
||||
if ((zone->allocator.arenas.arenaListsAreEmpty() && !zone->hasMarkedCompartments()) ||
|
||||
lastGC)
|
||||
{
|
||||
zone->allocator.arenas.checkEmptyFreeLists();
|
||||
if (callback)
|
||||
callback(zone);
|
||||
|
Loading…
Reference in New Issue
Block a user