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

Unified Diff: Source/core/frame/Console.cpp

Issue 472023002: [DevTools] ConsoleAPI messages pass through frame console (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: PassRefPtr<ConsoleMessage> -> PassRefPtrWillBeRawPtr<ConsoleMessage> Created 6 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
« no previous file with comments | « Source/core/frame/Console.h ('k') | Source/core/frame/ConsoleBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/Console.cpp
diff --git a/Source/core/frame/Console.cpp b/Source/core/frame/Console.cpp
index b46e8c5cb5b41c0a550adff2fc0f0532c986cab5..5c2d7f19b19702a0aa980f5f7b1aff44f64f354a 100644
--- a/Source/core/frame/Console.cpp
+++ b/Source/core/frame/Console.cpp
@@ -63,17 +63,12 @@ ExecutionContext* Console::context()
return m_frame->document();
}
-void Console::reportMessageToClient(MessageLevel level, const String& message, PassRefPtrWillBeRawPtr<ScriptCallStack> callStack)
+void Console::reportMessageToConsole(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleMessage)
{
- if (!m_frame || !m_frame->host() || !callStack.get())
+ if (!m_frame)
return;
- String stackTrace;
- if (m_frame->chromeClient().shouldReportDetailedMessageForSource(callStack->at(0).sourceURL())) {
- RefPtrWillBeRawPtr<ScriptCallStack> fullStack = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture);
- stackTrace = FrameConsole::formatStackTraceString(message, fullStack);
- }
- m_frame->chromeClient().addMessageToConsole(m_frame, ConsoleAPIMessageSource, level, message, callStack->at(0).lineNumber(), callStack->at(0).sourceURL(), stackTrace);
+ m_frame->console().addMessage(consoleMessage);
}
PassRefPtrWillBeRawPtr<MemoryInfo> Console::memory() const
« no previous file with comments | « Source/core/frame/Console.h ('k') | Source/core/frame/ConsoleBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698