Changeset 53460 in webkit for trunk/JavaScriptCore/runtime/Collector.cpp
- Timestamp:
- Jan 19, 2010, 12:39:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Collector.cpp
r53459 r53460 187 187 return; 188 188 189 ASSERT(!m_globalData->dynamicGlobalObject); 190 ASSERT(!isBusy()); 191 189 192 // The global object is not GC protected at this point, so sweeping may delete it 190 193 // (and thus the global data) before other objects that may use the global data. … … 291 294 NEVER_INLINE void Heap::freeBlock(size_t block) 292 295 { 296 m_heap.didShrink = true; 297 293 298 ObjectIterator it(m_heap, block); 294 299 ObjectIterator end(m_heap, block + 1); … … 330 335 void Heap::freeBlocks() 331 336 { 332 while (m_heap.usedBlocks) 333 freeBlock(0); 337 ProtectCountSet protectedValuesCopy = m_protectedValues; 338 339 clearMarkBits(); 340 markProtectedObjects(m_globalData->markStack); 341 342 m_heap.nextCell = 0; 343 m_heap.nextBlock = 0; 344 DeadObjectIterator it(m_heap, m_heap.nextBlock, m_heap.nextCell); 345 DeadObjectIterator end(m_heap, m_heap.usedBlocks); 346 for ( ; it != end; ++it) 347 (*it)->~JSCell(); 348 349 ASSERT(!protectedObjectCount()); 350 351 ProtectCountSet::iterator protectedValuesEnd = protectedValuesCopy.end(); 352 for (ProtectCountSet::iterator protectedValuesIt = protectedValuesCopy.begin(); protectedValuesIt != protectedValuesEnd; ++protectedValuesIt) 353 protectedValuesIt->first->~JSCell(); 354 355 for (size_t block = 0; block < m_heap.usedBlocks; ++block) 356 freeBlockPtr(m_heap.blocks[block]); 357 334 358 fastFree(m_heap.blocks); 359 335 360 memset(&m_heap, 0, sizeof(CollectorHeap)); 336 361 } … … 441 466 if (m_heap.blocks[i]->marked.isEmpty()) { 442 467 freeBlock(i); 443 m_heap.didShrink = true;444 468 } else 445 469 ++i;
Note:
See TracChangeset
for help on using the changeset viewer.