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

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

Issue 593123003: DevTools: make console.timeline/timelineEnd work for tracing based Timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments Created 6 years, 3 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 | « LayoutTests/inspector/tracing/console-timeline-expected.txt ('k') | Source/core/frame/ConsoleBase.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/ConsoleBase.cpp
diff --git a/Source/core/frame/ConsoleBase.cpp b/Source/core/frame/ConsoleBase.cpp
index 6dd5b143d9c0249d62aa08fe07c8b3e81bec2f5e..f1967b89ed556d43eee057d5472ef18b73e66e27 100644
--- a/Source/core/frame/ConsoleBase.cpp
+++ b/Source/core/frame/ConsoleBase.cpp
@@ -182,14 +182,25 @@ void ConsoleBase::timeStamp(const String& title)
InspectorInstrumentation::consoleTimeStamp(context(), title);
}
+static String formatTimelineTitle(const String& title)
+{
+ return String::format("Timeline '%s'", title.utf8().data());
+}
+
void ConsoleBase::timeline(ScriptState* scriptState, const String& title)
{
+ // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing.
InspectorInstrumentation::consoleTimeline(context(), title, scriptState);
+
+ TRACE_EVENT_COPY_ASYNC_BEGIN0("blink.console", formatTimelineTitle(title).utf8().data(), this);
}
void ConsoleBase::timelineEnd(ScriptState* scriptState, const String& title)
{
+ // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing.
InspectorInstrumentation::consoleTimelineEnd(context(), title, scriptState);
+
+ TRACE_EVENT_COPY_ASYNC_END0("blink.console", formatTimelineTitle(title).utf8().data(), this);
}
void ConsoleBase::group(ScriptState* scriptState, PassRefPtrWillBeRawPtr<ScriptArguments> arguments)
« no previous file with comments | « LayoutTests/inspector/tracing/console-timeline-expected.txt ('k') | Source/core/frame/ConsoleBase.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698