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

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

Issue 397813006: DevTools: move events array from Timeline.stop response to Timeline.stopped (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 ab2fa3c972dab28a8001532d6e4be3b6806b4c39..43e8aad95c5bd02002de80ffd069c7383d4e03da 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -269,8 +269,7 @@ void InspectorTimelineAgent::setFrontend(InspectorFrontend* frontend)
void InspectorTimelineAgent::clearFrontend()
{
ErrorString error;
- RefPtr<TypeBuilder::Array<TimelineEvent> > events;
- stop(&error, events);
+ stop(&error);
disable(&error);
m_frontend = 0;
}
@@ -288,7 +287,7 @@ void InspectorTimelineAgent::restore()
// Tell front-end timline is no longer collecting.
m_state->setBoolean(TimelineAgentState::started, false);
bool fromConsole = true;
- m_frontend->stopped(&fromConsole);
+ m_frontend->stopped(&fromConsole, nullptr);
}
}
@@ -376,7 +375,7 @@ void InspectorTimelineAgent::innerStart()
}
}
-void InspectorTimelineAgent::stop(ErrorString* errorString, RefPtr<TypeBuilder::Array<TimelineEvent> >& events)
+void InspectorTimelineAgent::stop(ErrorString* errorString)
{
m_state->setBoolean(TimelineAgentState::startedFromProtocol, false);
m_state->setBoolean(TimelineAgentState::bufferEvents, false);
@@ -387,8 +386,6 @@ void InspectorTimelineAgent::stop(ErrorString* errorString, RefPtr<TypeBuilder::
return;
}
innerStop(false);
- if (m_bufferedEvents)
- events = m_bufferedEvents.release();
m_liveEvents.clear();
}
@@ -419,7 +416,7 @@ void InspectorTimelineAgent::innerStop(bool fromConsole)
}
m_consoleTimelines.clear();
- m_frontend->stopped(&fromConsole);
+ m_frontend->stopped(&fromConsole, m_bufferedEvents.release());
if (m_overlay)
m_overlay->finishedRecordingProfile();
}

Powered by Google App Engine
This is Rietveld 408576698