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

Unified Diff: Source/core/inspector/InspectorConsoleAgent.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 | « Source/core/inspector/InspectorConsoleAgent.h ('k') | Source/core/inspector/InspectorController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorConsoleAgent.cpp
diff --git a/Source/core/inspector/InspectorConsoleAgent.cpp b/Source/core/inspector/InspectorConsoleAgent.cpp
index 46827f93b8136f2243f22d19acb5e0fd873a7702..5953dbe313cc14b04bec3ec177278e379d3ee830 100644
--- a/Source/core/inspector/InspectorConsoleAgent.cpp
+++ b/Source/core/inspector/InspectorConsoleAgent.cpp
@@ -39,7 +39,6 @@
#include "core/inspector/InjectedScriptManager.h"
#include "core/inspector/InspectorState.h"
#include "core/inspector/InspectorTimelineAgent.h"
-#include "core/inspector/InspectorTracingAgent.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/inspector/ScriptArguments.h"
#include "core/inspector/ScriptAsyncCallStack.h"
@@ -66,10 +65,9 @@ static const char tracingBasedTimeline[] = "tracingBasedTimeline";
int InspectorConsoleAgent::s_enabledAgentCount = 0;
-InspectorConsoleAgent::InspectorConsoleAgent(InspectorTimelineAgent* timelineAgent, InspectorTracingAgent* tracingAgent, InjectedScriptManager* injectedScriptManager)
+InspectorConsoleAgent::InspectorConsoleAgent(InspectorTimelineAgent* timelineAgent, InjectedScriptManager* injectedScriptManager)
: InspectorBaseAgent<InspectorConsoleAgent>("Console")
, m_timelineAgent(timelineAgent)
- , m_tracingAgent(tracingAgent)
, m_injectedScriptManager(injectedScriptManager)
, m_frontend(0)
, m_enabled(false)
@@ -86,7 +84,6 @@ InspectorConsoleAgent::~InspectorConsoleAgent()
void InspectorConsoleAgent::trace(Visitor* visitor)
{
visitor->trace(m_timelineAgent);
- visitor->trace(m_tracingAgent);
visitor->trace(m_injectedScriptManager);
InspectorBaseAgent::trace(visitor);
}
@@ -177,17 +174,13 @@ void InspectorConsoleAgent::setTracingBasedTimeline(ErrorString*, bool enabled)
void InspectorConsoleAgent::consoleTimeline(ExecutionContext* context, const String& title, ScriptState* scriptState)
{
UseCounter::count(context, UseCounter::DevToolsConsoleTimeline);
- if (m_tracingAgent && m_state->getBoolean(ConsoleAgentState::tracingBasedTimeline))
- m_tracingAgent->consoleTimeline(title);
- else
+ if (!m_state->getBoolean(ConsoleAgentState::tracingBasedTimeline))
m_timelineAgent->consoleTimeline(context, title, scriptState);
}
void InspectorConsoleAgent::consoleTimelineEnd(ExecutionContext* context, const String& title, ScriptState* scriptState)
{
- if (m_state->getBoolean(ConsoleAgentState::tracingBasedTimeline))
- m_tracingAgent->consoleTimelineEnd(title);
- else
+ if (!m_state->getBoolean(ConsoleAgentState::tracingBasedTimeline))
m_timelineAgent->consoleTimelineEnd(context, title, scriptState);
}
« no previous file with comments | « Source/core/inspector/InspectorConsoleAgent.h ('k') | Source/core/inspector/InspectorController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698