Bug 787947. We crash with dump-paint-list enabled when there are nested calls to nsLayoutUtils::PaintFrame. r=mattwoodrow

This commit is contained in:
Robert O'Callahan 2012-09-25 15:25:47 +12:00
parent 5c7e90e7e0
commit 40bf868600

View File

@ -1687,6 +1687,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
}
#ifdef MOZ_DUMP_PAINTING
FILE* savedDumpFile = gfxUtils::sDumpPaintFile;
if (gfxUtils::sDumpPaintList || gfxUtils::sDumpPainting) {
if (gfxUtils::sDumpPaintingToFile) {
nsCString string("dump-");
@ -1776,7 +1777,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
fprintf(gfxUtils::sDumpPaintFile, "</body></html>");
fclose(gfxUtils::sDumpPaintFile);
}
gfxUtils::sDumpPaintFile = NULL;
gfxUtils::sDumpPaintFile = savedDumpFile;
gPaintCount++;
}
#endif