Changeset 34712 in webkit for trunk/JavaScriptCore/profiler/Profile.cpp
- Timestamp:
- Jun 21, 2008, 12:04:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/Profile.cpp
r34710 r34712 38 38 static const char* NonJSExecution = "(idle)"; 39 39 40 static void calculateVisibleTotalTime(ProfileNode* n) { n->calculateVisibleTotalTime(); }41 static void restoreAll(ProfileNode* n) { n->restore(); }42 static void stopProfiling(ProfileNode* n) { n->stopProfiling(); }43 44 40 PassRefPtr<Profile> Profile::create(const UString& title, ExecState* originatingGlobalExec, unsigned pageGroupIdentifier, ProfilerClient* client) 45 41 { … … 62 58 void Profile::stopProfiling() 63 59 { 64 forEach( KJS::stopProfiling);60 forEach(&ProfileNode::stopProfiling); 65 61 removeProfileStart(); 66 62 removeProfileEnd(); … … 164 160 } 165 161 166 void Profile::forEach( UnaryFunction function)162 void Profile::forEach(void (ProfileNode::*function)()) 167 163 { 168 164 ProfileNode* currentNode = m_head->firstChild(); … … 172 168 ProfileNode* endNode = m_head->traverseNextNodePostOrder(); 173 169 while (currentNode && currentNode != endNode) { 174 function(currentNode);170 (currentNode->*function)(); 175 171 currentNode = currentNode->traverseNextNodePostOrder(); 176 172 } … … 188 184 189 185 // Set the visible time of all nodes so that the %s display correctly. 190 forEach( KJS::calculateVisibleTotalTime);186 forEach(&ProfileNode::calculateVisibleTotalTime); 191 187 } 192 188 … … 208 204 void Profile::restoreAll() 209 205 { 210 forEach( KJS::restoreAll);206 forEach(&ProfileNode::restore); 211 207 } 212 208
Note:
See TracChangeset
for help on using the changeset viewer.