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

Side by Side Diff: Source/WebCore/inspector/InspectorProfilerAgent.cpp

Issue 6246044: Merge 77254 - 2011-02-01 Mikhail Naganov <mnaganov@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698