Index: third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js |
index 3d1d266e87bf651ba976c86638bff39fec856255..109f3eac5a6cc11d98f7ce62b4a094967fd305b9 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js |
+++ b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js |
@@ -62,6 +62,9 @@ WebInspector.FormattedContentBuilder.prototype = { |
*/ |
addNewLine: function(noSquash) |
{ |
+ // Avoid leading newlines. |
+ if (!this._formattedContentLength) |
+ return; |
if (noSquash) |
++this._newLines; |
else |