| Index: Source/core/inspector/InspectorProfilerAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorProfilerAgent.cpp b/Source/core/inspector/InspectorProfilerAgent.cpp
|
| index e63c98da79c8a9c2de13123cfa2573b0694b424c..f7083a9cbf51ce659fe6310363bdc397348f60f5 100644
|
| --- a/Source/core/inspector/InspectorProfilerAgent.cpp
|
| +++ b/Source/core/inspector/InspectorProfilerAgent.cpp
|
| @@ -157,11 +157,6 @@
|
|
|
| void InspectorProfilerAgent::disable(ErrorString*)
|
| {
|
| - for (Vector<ProfileDescriptor>::const_reverse_iterator it = m_startedProfiles.rbegin(); it != m_startedProfiles.rend(); ++it)
|
| - m_keepAliveProfile = ScriptProfiler::stop(it->m_id);
|
| - m_startedProfiles.clear();
|
| - stop(0, 0);
|
| -
|
| m_keepAliveProfile.clear();
|
| m_instrumentingAgents->setInspectorProfilerAgent(0);
|
| m_state->setBoolean(ProfilerAgentState::profilerEnabled, false);
|
| @@ -190,9 +185,10 @@
|
| void InspectorProfilerAgent::clearFrontend()
|
| {
|
| m_frontend = 0;
|
| + stop(0, 0);
|
| + m_injectedScriptManager->injectedScriptHost()->clearInspectedObjects();
|
| ErrorString error;
|
| disable(&error);
|
| - m_injectedScriptManager->injectedScriptHost()->clearInspectedObjects();
|
| }
|
|
|
| void InspectorProfilerAgent::restore()
|
| @@ -212,8 +208,8 @@
|
| if (m_recordingCPUProfile)
|
| return;
|
| if (!enabled()) {
|
| - *error = "Profiler is not enabled";
|
| - return;
|
| + ErrorString error;
|
| + enable(&error);
|
| }
|
| m_recordingCPUProfile = true;
|
| if (m_overlay)
|
|
|