Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1461)

Unified Diff: Source/core/page/PageConsole.cpp

Issue 18822004: Extension Error Piping - Blink: WebKit Side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Extracted Formatting Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/page/PageConsole.cpp
diff --git a/Source/core/page/PageConsole.cpp b/Source/core/page/PageConsole.cpp
index 07bbb252a6ce2974edde7df033fa5d860034e9b2..3ba5975ef589a41cecff4a4682295898c6b7d5e5 100644
--- a/Source/core/page/PageConsole.cpp
+++ b/Source/core/page/PageConsole.cpp
@@ -37,6 +37,7 @@
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/ConsoleTypes.h"
+#include "core/page/FormatConsoleMessage.h"
#include "core/page/Page.h"
#include "wtf/text/WTFString.h"
@@ -91,7 +92,14 @@ void PageConsole::addMessage(MessageSource source, MessageLevel level, const Str
if (source == CSSMessageSource)
return;
- page->chrome().client()->addMessageToConsole(source, level, message, lineNumber, url);
+ String chromeMessage;
+ if (page->chrome().client()->shouldReportDetailedMessageForSource(url)) {
+ if (callStack)
+ chromeMessage = formatConsoleMessage(message, callStack);
+ else
+ chromeMessage = formatConsoleMessage(message, url, lineNumber, columnNumber);
+ }
+ page->chrome().client()->addMessageToConsole(source, level, chromeMessage, lineNumber, url);
pfeldman 2013/08/14 09:53:00 Wait, I thought we agreed on an additional text fi
Devlin 2013/08/14 17:00:40 Okay. Wasn't sure if plain-text should go with pl
}
// static

Powered by Google App Engine
This is Rietveld 408576698