зеркало из https://github.com/mozilla/pjs.git
Bug 749698 - Setup compartment to collect when gcPoke set (r=igor)
This commit is contained in:
Родитель
2c8dfbd39d
Коммит
85d2874b26
|
@ -3688,10 +3688,8 @@ Collect(JSRuntime *rt, bool incremental, int64_t budget,
|
||||||
callback(rt, JSGC_BEGIN);
|
callback(rt, JSGC_BEGIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
rt->gcPoke = false;
|
rt->gcPoke = false;
|
||||||
GCCycle(rt, incremental, budget, gckind);
|
GCCycle(rt, incremental, budget, gckind);
|
||||||
}
|
|
||||||
|
|
||||||
if (rt->gcIncrementalState == NO_INCREMENTAL) {
|
if (rt->gcIncrementalState == NO_INCREMENTAL) {
|
||||||
gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_GC_END);
|
gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_GC_END);
|
||||||
|
@ -3699,6 +3697,10 @@ Collect(JSRuntime *rt, bool incremental, int64_t budget,
|
||||||
callback(rt, JSGC_END);
|
callback(rt, JSGC_END);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Need to re-schedule all compartments for GC. */
|
||||||
|
if (!rt->hasContexts() && rt->gcPoke)
|
||||||
|
PrepareForFullGC(rt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On shutdown, iterate until finalizers or the JSGC_END callback
|
* On shutdown, iterate until finalizers or the JSGC_END callback
|
||||||
* stop creating garbage.
|
* stop creating garbage.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче