Changeset 16797 in webkit for trunk/JavaScriptCore/kjs/collector.cpp
- Timestamp:
- Oct 4, 2006, 6:07:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/collector.cpp
r16614 r16797 119 119 size_t numLiveObjectsAtLastCollect = heap.numLiveObjectsAtLastCollect; 120 120 size_t numNewObjects = numLiveObjects - numLiveObjectsAtLastCollect; 121 121 122 if (numNewObjects >= ALLOCATIONS_PER_COLLECTION && numNewObjects >= numLiveObjectsAtLastCollect) { 122 123 collect(); … … 493 494 imp->m_marked = false; 494 495 } else if (currentThreadIsMainThread || imp->m_destructorIsThreadSafe) { 496 // special case for allocated but uninitialized object 497 // (We don't need this check earlier because nothing prior this point assumes the object has a valid vptr.) 498 if (cell->u.freeCell.zeroIfFree == 0) 499 continue; 500 495 501 imp->~JSCell(); 496 502 --usedCells; … … 505 511 } else { 506 512 size_t minimumCellsToProcess = usedCells; 507 for (size_t i = 0; i < minimumCellsToProcess; i++) {513 for (size_t i = 0; (i < minimumCellsToProcess) & (i < CELLS_PER_BLOCK); i++) { 508 514 CollectorCell *cell = curBlock->cells + i; 509 515 if (cell->u.freeCell.zeroIfFree == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.