Chromium Code Reviews| 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.
|
| +} |
| + |
| } |