From 95c9ee19e1ec3f3b00cca7f973a0b44ed4ceca28 Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Tue, 8 Jul 2014 17:03:58 -0400 Subject: [PATCH] Bug 1035978 - Layers/displaylist dumps don't print newline. r=kats --- gfx/layers/Layers.h | 4 +++- layout/base/nsLayoutUtils.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index 5ad260dc2417..60d34ab92c15 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -571,7 +571,9 @@ public: char line[1024]; while (!ss.eof()) { ss.getline(line, sizeof(line)); - printf_stderr("%s", line); + if (!ss.eof() || strlen(line) > 0) { + printf_stderr("%s\n", line); + } if (ss.fail()) { // line was too long, skip to next newline ss.clear(); diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 59df9a796d1c..d1778ed28f82 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -3000,7 +3000,9 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram char line[1024]; while (!ss.eof()) { ss.getline(line, sizeof(line)); - fprintf_stderr(gfxUtils::sDumpPaintFile, "%s", line); + if (!ss.eof() || strlen(line) > 0) { + fprintf_stderr(gfxUtils::sDumpPaintFile, "%s\n", line); + } if (ss.fail()) { // line was too long, skip to next newline ss.clear();