Bug 1150349 - Update the zone triggers when updating GC parameters; r=jonco

--HG--
extra : rebase_source : 73dbbc5505c6d3d4d9583ea94f2263e92295e065
This commit is contained in:
Terrence Cole 2015-07-08 10:32:55 -07:00
parent ba1e3c52d9
commit ed6bc85c89

View File

@ -1390,6 +1390,8 @@ GCRuntime::setParameter(JSGCParamKey key, uint32_t value)
switch (key) {
case JSGC_MAX_MALLOC_BYTES:
setMaxMallocBytes(value);
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next())
zone->setGCMaxMallocBytes(maxMallocBytesAllocated() * 0.9);
break;
case JSGC_SLICE_TIME_BUDGET:
sliceBudget = value ? value : SliceBudget::Unlimited;
@ -1411,6 +1413,10 @@ GCRuntime::setParameter(JSGCParamKey key, uint32_t value)
break;
default:
tunables.setParameter(key, value);
for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) {
zone->threshold.updateAfterGC(zone->usage.gcBytes(), GC_NORMAL, tunables,
schedulingState);
}
}
}