Changeset 77360 in webkit for trunk/Source/JavaScriptCore/runtime/Heap.cpp
- Timestamp:
- Feb 1, 2011, 9:05:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Heap.cpp
r77151 r77360 22 22 #include "Heap.h" 23 23 24 #include "CodeBlock.h" 24 25 #include "CollectorHeapIterator.h" 25 26 #include "ConservativeSet.h" … … 251 252 markTempSortVectors(markStack); 252 253 markStack.drain(); 254 255 HashSet<GlobalCodeBlock*>::const_iterator end = m_codeBlocks.end(); 256 for (HashSet<GlobalCodeBlock*>::const_iterator it = m_codeBlocks.begin(); it != end; ++it) 257 (*it)->markAggregate(markStack); 258 markStack.drain(); 253 259 254 260 // Mark misc. other roots. … … 290 296 size_t Heap::globalObjectCount() 291 297 { 298 return m_globalData->globalObjects.uncheckedSize(); 299 } 300 301 size_t Heap::protectedGlobalObjectCount() 302 { 292 303 size_t count = 0; 293 if (JSGlobalObject* head = m_globalData->head) { 294 JSGlobalObject* o = head; 295 do { 304 305 GlobalObjectMap& map = m_globalData->globalObjects; 306 GlobalObjectMap::iterator end = map.uncheckedEnd(); 307 for (GlobalObjectMap::iterator it = map.uncheckedBegin(); it != end; ++it) { 308 if (map.isValid(it) && m_protectedValues.contains(it->second.get())) 296 309 ++count; 297 o = o->next();298 } while (o != head);299 }300 return count;301 }302 303 size_t Heap::protectedGlobalObjectCount()304 {305 size_t count = 0;306 if (JSGlobalObject* head = m_globalData->head) {307 JSGlobalObject* o = head;308 do {309 if (m_protectedValues.contains(o))310 ++count;311 o = o->next();312 } while (o != head);313 310 } 314 311
Note:
See TracChangeset
for help on using the changeset viewer.