Bug 848560 (part 1) - dmd::ClearReports() needs to check if DMD is running before doing anything to avoid crashing. r=jlebar.

--HG--
extra : rebase_source : bdd7a6d1654dfbf562bc534311869248eb3c8a4a
This commit is contained in:
Nicholas Nethercote 2013-03-25 21:03:47 -07:00
Родитель c05a711a7d
Коммит 8ca600972c
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -2049,6 +2049,10 @@ SizeOf(Sizes* aSizes)
MOZ_EXPORT void MOZ_EXPORT void
ClearReports() ClearReports()
{ {
if (!gIsDMDRunning) {
return;
}
// Unreport all blocks that were marked reported by a memory reporter. This // Unreport all blocks that were marked reported by a memory reporter. This
// excludes those that were reported on allocation, because they need to keep // excludes those that were reported on allocation, because they need to keep
// their reported marking. // their reported marking.