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

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

Issue 24027002: DevTools: implement console.timeline/timelineEnd. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comments addressed. Created 7 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
Index: Source/core/page/ConsoleBase.cpp
diff --git a/Source/core/page/ConsoleBase.cpp b/Source/core/page/ConsoleBase.cpp
index e1eaa9e128caea9bdd72b46cbfcdb51e2f544b3d..a889446b55528a5b92f8fd46f05d391039479a82 100644
--- a/Source/core/page/ConsoleBase.cpp
+++ b/Source/core/page/ConsoleBase.cpp
@@ -111,9 +111,9 @@ void ConsoleBase::count(ScriptState* state, PassRefPtr<ScriptArguments> argument
InspectorInstrumentation::consoleCount(context(), state, arguments);
}
-void ConsoleBase::markTimeline(PassRefPtr<ScriptArguments> arguments)
+void ConsoleBase::markTimeline(const String& title)
{
- InspectorInstrumentation::consoleTimeStamp(context(), arguments);
+ InspectorInstrumentation::consoleTimeStamp(context(), title);
}
void ConsoleBase::profile(ScriptState* state, const String& title)
@@ -131,10 +131,7 @@ void ConsoleBase::profile(ScriptState* state, const String& title)
resolvedTitle = InspectorInstrumentation::getCurrentUserInitiatedProfileName(context, true);
ScriptProfiler::start(resolvedTitle);
-
- RefPtr<ScriptCallStack> callStack(createScriptCallStack(state, 1));
- const ScriptCallFrame& lastCaller = callStack->at(0);
- InspectorInstrumentation::addStartProfilingMessageToConsole(context, resolvedTitle, lastCaller.lineNumber(), lastCaller.sourceURL());
+ InspectorInstrumentation::addMessageToConsole(context, ConsoleAPIMessageSource, ProfileMessageType, DebugMessageLevel, resolvedTitle, String(), 0, 0, state);
}
void ConsoleBase::profileEnd(ScriptState* state, const String& title)
@@ -154,23 +151,31 @@ void ConsoleBase::profileEnd(ScriptState* state, const String& title)
InspectorInstrumentation::addProfile(context, profile, callStack);
}
-
void ConsoleBase::time(const String& title)
{
- InspectorInstrumentation::startConsoleTiming(context(), title);
+ InspectorInstrumentation::consoleTime(context(), title);
TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit.console", title.utf8().data(), this);
}
void ConsoleBase::timeEnd(ScriptState* state, const String& title)
{
TRACE_EVENT_COPY_ASYNC_END0("webkit.console", title.utf8().data(), this);
- RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state));
- InspectorInstrumentation::stopConsoleTiming(context(), title, callStack.release());
+ InspectorInstrumentation::consoleTimeEnd(context(), title, state);
+}
+
+void ConsoleBase::timeStamp(const String& title)
+{
+ InspectorInstrumentation::consoleTimeStamp(context(), title);
+}
+
+void ConsoleBase::timeline(ScriptState* state, const String& title)
+{
+ InspectorInstrumentation::consoleTimeline(context(), title, state);
}
-void ConsoleBase::timeStamp(PassRefPtr<ScriptArguments> arguments)
+void ConsoleBase::timelineEnd(ScriptState* state, const String& title)
{
- InspectorInstrumentation::consoleTimeStamp(context(), arguments);
+ InspectorInstrumentation::consoleTimelineEnd(context(), title, state);
}
void ConsoleBase::group(ScriptState* state, PassRefPtr<ScriptArguments> arguments)

Powered by Google App Engine
This is Rietveld 408576698