Bug 973574 - Fix AutoDebugModeInvalidation to not call FinishDiscardJitCode if it didn't discard JIT code. r=shu

This commit is contained in:
Jan de Mooij 2014-02-18 10:13:48 +01:00
Родитель 676729d71d
Коммит 10401a9c64
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -2879,7 +2879,9 @@ AutoDebugModeInvalidation::~AutoDebugModeInvalidation()
if (comp_) {
FinishDiscardJitCode(fop, comp_);
} else {
for (CompartmentsInZoneIter comp(zone_); !comp.done(); comp.next())
FinishDiscardJitCode(fop, comp);
for (CompartmentsInZoneIter comp(zone_); !comp.done(); comp.next()) {
if (comp->principals)
FinishDiscardJitCode(fop, comp);
}
}
}