Changeset 172404 in webkit
- Timestamp:
- Aug 11, 2014, 12:50:52 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r172397 r172404 1 2014-08-11 Timothy Hatcher <timothy@apple.com> 2 3 Web Inspector: console.profile shouldn't stop auto-recorded profiles 4 https://bugs.webkit.org/show_bug.cgi?id=135810 5 6 Reviewed by Joseph Pecoraro. 7 8 * inspector/InspectorTimelineAgent.cpp: 9 (WebCore::InspectorTimelineAgent::start): Added. Call internalStart. Set m_enabledFromFrontend. 10 (WebCore::InspectorTimelineAgent::stop): Added. Calls internalStop. Clear m_enabledFromFrontend. 11 (WebCore::InspectorTimelineAgent::internalStart): Renamed from start. 12 (WebCore::InspectorTimelineAgent::internalStop): Renamed from stop. 13 (WebCore::InspectorTimelineAgent::startFromConsole): Use internalStart. 14 (WebCore::InspectorTimelineAgent::stopFromConsole): Use internalStop. Only stop if !m_enabledFromFrontend. 15 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Initialize m_enabledFromFrontend. 16 * inspector/InspectorTimelineAgent.h: Added m_enabledFromFrontend. 17 1 18 2014-08-11 Brent Fulgham <bfulgham@apple.com> 2 19 -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp
r171866 r172404 100 100 void InspectorTimelineAgent::start(ErrorString*, const int* maxCallStackDepth) 101 101 { 102 m_enabledFromFrontend = true; 103 104 internalStart(maxCallStackDepth); 105 } 106 107 void InspectorTimelineAgent::stop(ErrorString*) 108 { 109 internalStop(); 110 111 m_enabledFromFrontend = false; 112 } 113 114 void InspectorTimelineAgent::internalStart(const int* maxCallStackDepth) 115 { 102 116 if (maxCallStackDepth && *maxCallStackDepth > 0) 103 117 m_maxCallStackDepth = *maxCallStackDepth; … … 118 132 } 119 133 120 void InspectorTimelineAgent:: stop(ErrorString*)134 void InspectorTimelineAgent::internalStop() 121 135 { 122 136 if (!m_enabled) … … 177 191 } 178 192 179 if ( m_pendingConsoleProfileRecords.isEmpty())180 start();193 if (!m_enabled && m_pendingConsoleProfileRecords.isEmpty()) 194 internalStart(); 181 195 182 196 startProfiling(exec, title); … … 204 218 m_pendingConsoleProfileRecords.remove(i); 205 219 206 if ( m_pendingConsoleProfileRecords.isEmpty())207 stop();220 if (!m_enabledFromFrontend && m_pendingConsoleProfileRecords.isEmpty()) 221 internalStop(); 208 222 209 223 return profile.release(); … … 683 697 , m_recordingProfileDepth(0) 684 698 , m_enabled(false) 699 , m_enabledFromFrontend(false) 685 700 { 686 701 } -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.h
r171866 r172404 246 246 }; 247 247 248 void internalStart(const int* maxCallStackDepth = nullptr); 249 void internalStop(); 250 248 251 void sendEvent(PassRefPtr<Inspector::InspectorObject>); 249 252 void appendRecord(PassRefPtr<Inspector::InspectorObject> data, TimelineRecordType, bool captureCallStack, Frame*); … … 285 288 int m_recordingProfileDepth; 286 289 bool m_enabled; 290 bool m_enabledFromFrontend; 287 291 }; 288 292
Note:
See TracChangeset
for help on using the changeset viewer.