Bug 958353, part 2 - Always check if an ICC is in progress in FixWeakMappingGrayBits(). r=smaug

This makes it easier to test against invalid interleavings of IGC and ICC.
This commit is contained in:
Andrew McCreight 2014-05-13 11:58:39 -07:00
Родитель 7b9e6640da
Коммит 9a4dabed51
1 изменённых файлов: 2 добавлений и 3 удалений

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

@ -250,9 +250,6 @@ private:
void* aKey, JSGCTraceKind aKeyKind,
void* aValue, JSGCTraceKind aValueKind)
{
MOZ_ASSERT(!JS::IsIncrementalGCInProgress(aTrc->runtime),
"Don't call FixWeakMappingGrayBits during a GC.");
FixWeakMappingGrayBitsTracer* tracer =
static_cast<FixWeakMappingGrayBitsTracer*>(aTrc);
@ -968,6 +965,8 @@ CycleCollectedJSRuntime::UsefulToMergeZones() const
void
CycleCollectedJSRuntime::FixWeakMappingGrayBits() const
{
MOZ_ASSERT(!JS::IsIncrementalGCInProgress(mJSRuntime),
"Don't call FixWeakMappingGrayBits during a GC.");
FixWeakMappingGrayBitsTracer fixer(mJSRuntime);
fixer.FixAll();
}