зеркало из https://github.com/mozilla/gecko-dev.git
Bug 811176 - Shrinking GCs should clean up everything (r=terrence,a=blocking-basecamp)
This commit is contained in:
Родитель
5f44ac9555
Коммит
4c2e6bbed5
|
@ -4556,7 +4556,7 @@ IsDeterministicGCReason(gcreason::Reason reason)
|
|||
#endif
|
||||
|
||||
static bool
|
||||
ShouldCleanUpEverything(JSRuntime *rt, gcreason::Reason reason)
|
||||
ShouldCleanUpEverything(JSRuntime *rt, gcreason::Reason reason, JSGCInvocationKind gckind)
|
||||
{
|
||||
// During shutdown, we must clean everything up, for the sake of leak
|
||||
// detection. When a runtime has no contexts, or we're doing a GC before a
|
||||
|
@ -4567,7 +4567,8 @@ ShouldCleanUpEverything(JSRuntime *rt, gcreason::Reason reason)
|
|||
// we need to clear everything away.
|
||||
return !rt->hasContexts() ||
|
||||
reason == gcreason::SHUTDOWN_CC ||
|
||||
reason == gcreason::DEBUG_MODE_GC;
|
||||
reason == gcreason::DEBUG_MODE_GC ||
|
||||
gckind == GC_SHRINK;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -4635,7 +4636,7 @@ Collect(JSRuntime *rt, bool incremental, int64_t budget,
|
|||
collectedCount++;
|
||||
}
|
||||
|
||||
rt->gcShouldCleanUpEverything = ShouldCleanUpEverything(rt, reason);
|
||||
rt->gcShouldCleanUpEverything = ShouldCleanUpEverything(rt, reason, gckind);
|
||||
|
||||
gcstats::AutoGCSlice agc(rt->gcStats, collectedCount, compartmentCount, reason);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче