Bug 1194430 - Always mark the global jitcode table during major GCs. (r=djvj)

This commit is contained in:
Shu-yu Guo 2015-08-19 12:02:32 -07:00
Родитель df4b17486d
Коммит c3ccaf7607
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -644,8 +644,7 @@ JitRuntime::MarkJitcodeGlobalTableUnconditionally(JSTracer* trc)
/* static */ bool
JitRuntime::MarkJitcodeGlobalTableIteratively(JSTracer* trc)
{
if (trc->runtime()->spsProfiler.enabled() &&
trc->runtime()->hasJitRuntime() &&
if (trc->runtime()->hasJitRuntime() &&
trc->runtime()->jitRuntime()->hasJitcodeGlobalTable())
{
return trc->runtime()->jitRuntime()->getJitcodeGlobalTable()->markIteratively(trc);

Просмотреть файл

@ -808,12 +808,15 @@ JitcodeGlobalTable::markIteratively(JSTracer* trc)
// above is checked in JitcodeGlobalTable::lookupForSampler.
MOZ_ASSERT(!trc->runtime()->isHeapMinorCollecting());
MOZ_ASSERT(trc->runtime()->spsProfiler.enabled());
AutoSuppressProfilerSampling suppressSampling(trc->runtime());
uint32_t gen = trc->runtime()->profilerSampleBufferGen();
uint32_t lapCount = trc->runtime()->profilerSampleBufferLapCount();
// If the profiler is off, all entries are considered to be expired.
if (!trc->runtime()->spsProfiler.enabled())
gen = UINT32_MAX;
bool markedAny = false;
for (Range r(*this); !r.empty(); r.popFront()) {
JitcodeGlobalEntry* entry = r.front();