зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1120591 - Avoid race condition updating gcTriggerBytes_ between main and background threads r=terrence
This commit is contained in:
Родитель
b05e307454
Коммит
187c1abc2a
|
@ -5111,6 +5111,8 @@ GCRuntime::endSweepingZoneGroup()
|
||||||
for (GCZoneGroupIter zone(rt); !zone.done(); zone.next()) {
|
for (GCZoneGroupIter zone(rt); !zone.done(); zone.next()) {
|
||||||
MOZ_ASSERT(zone->isGCSweeping());
|
MOZ_ASSERT(zone->isGCSweeping());
|
||||||
zone->setGCState(Zone::Finished);
|
zone->setGCState(Zone::Finished);
|
||||||
|
zone->threshold.updateAfterGC(zone->usage.gcBytes(), invocationKind, tunables,
|
||||||
|
schedulingState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start background thread to sweep zones if required. */
|
/* Start background thread to sweep zones if required. */
|
||||||
|
@ -5547,8 +5549,6 @@ GCRuntime::finishCollection()
|
||||||
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
|
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
|
||||||
if (zone->isCollecting()) {
|
if (zone->isCollecting()) {
|
||||||
MOZ_ASSERT(zone->isGCFinished() || zone->isGCCompacting());
|
MOZ_ASSERT(zone->isGCFinished() || zone->isGCCompacting());
|
||||||
zone->threshold.updateAfterGC(zone->usage.gcBytes(), invocationKind, tunables,
|
|
||||||
schedulingState);
|
|
||||||
zone->setGCState(Zone::NoGC);
|
zone->setGCState(Zone::NoGC);
|
||||||
zone->active = false;
|
zone->active = false;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче