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

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

Issue 657383002: DevTools: clear session id. follow-up patch after r183608 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix Created 6 years, 2 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/InspectorTracingAgent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorTracingAgent.cpp
diff --git a/Source/core/inspector/InspectorTracingAgent.cpp b/Source/core/inspector/InspectorTracingAgent.cpp
index 8e8edac01e7a874a5244db6f0744005010bf7627..dea93bda97cbe7e31864a9dfc26384379947e20a 100644
--- a/Source/core/inspector/InspectorTracingAgent.cpp
+++ b/Source/core/inspector/InspectorTracingAgent.cpp
@@ -40,6 +40,7 @@ void InspectorTracingAgent::restore()
void InspectorTracingAgent::start(ErrorString*, const String& categoryFilter, const String&, const double*, PassRefPtrWillBeRawPtr<StartCallback> callback)
{
+ ASSERT(m_state->getString(TracingAgentState::sessionId).isEmpty());
m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createIdentifier());
m_client->enableTracing(categoryFilter);
emitMetadataEvents();
@@ -48,6 +49,7 @@ void InspectorTracingAgent::start(ErrorString*, const String& categoryFilter, co
void InspectorTracingAgent::end(ErrorString* errorString, PassRefPtrWillBeRawPtr<EndCallback> callback)
{
+ m_state->remove(TracingAgentState::sessionId);
m_client->disableTracing();
m_workerAgent->setTracingSessionId(String());
callback->sendSuccess();
@@ -77,4 +79,9 @@ void InspectorTracingAgent::setFrontend(InspectorFrontend* frontend)
m_frontend = frontend->tracing();
}
+void InspectorTracingAgent::clearFrontend()
+{
+ m_state->remove(TracingAgentState::sessionId);
yurys 2014/10/17 06:29:35 You should also reset session id on the worker age
loislo 2014/10/17 07:12:00 Done.
+}
+
}
« no previous file with comments | « Source/core/inspector/InspectorTracingAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698