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

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

Issue 427803002: DevTools: nits: introduce a handy asBool(bool*) and use across agents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed 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
« no previous file with comments | « Source/core/inspector/InspectorRuntimeAgent.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorTimelineAgent.cpp
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp
index 8ae63728d17c1f358a082b62995193c74a6a4338..5ad337d8443252e27d297cd26d87bdeed5f81fbd 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -365,7 +365,7 @@ void InspectorTimelineAgent::start(ErrorString* errorString, const int* maxCallS
else
m_maxCallStackDepth = 5;
- if (bufferEvents && *bufferEvents) {
+ if (asBool(bufferEvents)) {
m_bufferedEvents = TypeBuilder::Array<TimelineEvent>::create();
m_lastProgressTimestamp = timestamp();
}
@@ -374,9 +374,9 @@ void InspectorTimelineAgent::start(ErrorString* errorString, const int* maxCallS
setLiveEvents(*liveEvents);
m_state->setLong(TimelineAgentState::timelineMaxCallStackDepth, m_maxCallStackDepth);
- m_state->setBoolean(TimelineAgentState::includeCounters, includeCounters && *includeCounters);
- m_state->setBoolean(TimelineAgentState::includeGPUEvents, includeGPUEvents && *includeGPUEvents);
- m_state->setBoolean(TimelineAgentState::bufferEvents, bufferEvents && *bufferEvents);
+ m_state->setBoolean(TimelineAgentState::includeCounters, asBool(includeCounters));
+ m_state->setBoolean(TimelineAgentState::includeGPUEvents, asBool(includeGPUEvents));
+ m_state->setBoolean(TimelineAgentState::bufferEvents, asBool(bufferEvents));
m_state->setString(TimelineAgentState::liveEvents, liveEvents ? *liveEvents : "");
innerStart();
« no previous file with comments | « Source/core/inspector/InspectorRuntimeAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698