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

Unified Diff: Source/core/inspector/InspectorTimelineAgent.cpp

Issue 376213002: DevTools: Make FrameConsole methods accept ConsoleMessage objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@scriptFailedToParse
Patch Set: Created 6 years, 5 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/inspector/InspectorTimelineAgent.cpp
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp
index 86e60212682e654065bbb255b61c6a363c57a2c2..7525fb5685c1fa2b1f6e7d18ffc8b5feff130983 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -31,12 +31,14 @@
#include "config.h"
#include "core/inspector/InspectorTimelineAgent.h"
+#include "bindings/core/v8/ScriptCallStackFactory.h"
#include "core/events/Event.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/FrameConsole.h"
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InspectorClient.h"
#include "core/inspector/InspectorCounters.h"
@@ -415,7 +417,7 @@ void InspectorTimelineAgent::innerStop(bool fromConsole)
for (size_t i = 0; i < m_consoleTimelines.size(); ++i) {
String message = String::format("Timeline '%s' terminated.", m_consoleTimelines[i].utf8().data());
- mainFrame()->console().addMessage(ConsoleAPIMessageSource, DebugMessageLevel, message);
+ mainFrame()->console().addMessage(ConsoleMessage::create(ConsoleAPIMessageSource, DebugMessageLevel, message));
}
m_consoleTimelines.clear();
@@ -778,7 +780,7 @@ void InspectorTimelineAgent::consoleTimeline(ExecutionContext* context, const St
return;
String message = String::format("Timeline '%s' started.", title.utf8().data());
- mainFrame()->console().addMessage(ConsoleAPIMessageSource, DebugMessageLevel, message, String(), 0, 0, nullptr, scriptState);
+ mainFrame()->console().addMessage(ConsoleMessage::create(ConsoleAPIMessageSource, DebugMessageLevel, message, createScriptCallStackForConsole(scriptState)));
m_consoleTimelines.append(title);
if (!isStarted()) {
innerStart();
@@ -796,7 +798,7 @@ void InspectorTimelineAgent::consoleTimelineEnd(ExecutionContext* context, const
size_t index = m_consoleTimelines.find(title);
if (index == kNotFound) {
String message = String::format("Timeline '%s' was not started.", title.utf8().data());
- mainFrame()->console().addMessage(ConsoleAPIMessageSource, DebugMessageLevel, message, String(), 0, 0, nullptr, scriptState);
+ mainFrame()->console().addMessage(ConsoleMessage::create(ConsoleAPIMessageSource, DebugMessageLevel, message, createScriptCallStackForConsole(scriptState)));
return;
}
@@ -807,7 +809,7 @@ void InspectorTimelineAgent::consoleTimelineEnd(ExecutionContext* context, const
unwindRecordStack();
innerStop(true);
}
- mainFrame()->console().addMessage(ConsoleAPIMessageSource, DebugMessageLevel, message, String(), 0, 0, nullptr, scriptState);
+ mainFrame()->console().addMessage(ConsoleMessage::create(ConsoleAPIMessageSource, DebugMessageLevel, message, createScriptCallStackForConsole(scriptState)));
}
void InspectorTimelineAgent::domContentLoadedEventFired(LocalFrame* frame)

Powered by Google App Engine
This is Rietveld 408576698