OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 m_profiles.clear(); | 213 m_profiles.clear(); |
214 m_snapshots.clear(); | 214 m_snapshots.clear(); |
215 m_currentUserInitiatedProfileNumber = 1; | 215 m_currentUserInitiatedProfileNumber = 1; |
216 m_nextUserInitiatedProfileNumber = 1; | 216 m_nextUserInitiatedProfileNumber = 1; |
217 m_nextUserInitiatedHeapSnapshotNumber = 1; | 217 m_nextUserInitiatedHeapSnapshotNumber = 1; |
218 resetFrontendProfiles(); | 218 resetFrontendProfiles(); |
219 } | 219 } |
220 | 220 |
221 void InspectorProfilerAgent::resetFrontendProfiles() | 221 void InspectorProfilerAgent::resetFrontendProfiles() |
222 { | 222 { |
223 if (m_frontend && m_profiles.begin() == m_profiles.end()) | 223 if (m_frontend |
| 224 && m_profiles.begin() == m_profiles.end() |
| 225 && m_snapshots.begin() == m_snapshots.end()) |
224 m_frontend->resetProfiles(); | 226 m_frontend->resetProfiles(); |
225 } | 227 } |
226 | 228 |
227 void InspectorProfilerAgent::startUserInitiatedProfiling() | 229 void InspectorProfilerAgent::startUserInitiatedProfiling() |
228 { | 230 { |
229 if (m_recordingUserInitiatedProfile) | 231 if (m_recordingUserInitiatedProfile) |
230 return; | 232 return; |
231 if (!enabled()) { | 233 if (!enabled()) { |
232 enable(false); | 234 enable(false); |
233 ScriptDebugServer::shared().recompileAllJSFunctions(); | 235 ScriptDebugServer::shared().recompileAllJSFunctions(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 284 |
283 void InspectorProfilerAgent::toggleRecordButton(bool isProfiling) | 285 void InspectorProfilerAgent::toggleRecordButton(bool isProfiling) |
284 { | 286 { |
285 if (m_frontend) | 287 if (m_frontend) |
286 m_frontend->setRecordingProfile(isProfiling); | 288 m_frontend->setRecordingProfile(isProfiling); |
287 } | 289 } |
288 | 290 |
289 } // namespace WebCore | 291 } // namespace WebCore |
290 | 292 |
291 #endif // ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) | 293 #endif // ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) |
OLD | NEW |