Ignore:
Timestamp:
Jul 30, 2012, 6:48:18 PM (13 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r124123.
http://trac.webkit.org/changeset/124123
https://bugs.webkit.org/show_bug.cgi?id=92700

ASSERT crashes terminate webkit Layout tests (Requested by
msaboff on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-07-30

  • heap/Heap.cpp:
  • heap/Heap.h:

(Heap):

  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::doSweep):
(JSC::IncrementalSweeper::startSweeping):
(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC):

  • heap/IncrementalSweeper.h:

(IncrementalSweeper):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::tryAllocateHelper):
(JSC::MarkedAllocator::addBlock):

  • heap/MarkedAllocator.h:

(JSC::MarkedAllocator::zapFreeList):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::sweepHelper):

  • heap/MarkedSpace.cpp:
  • heap/MarkedSpace.h:

(JSC::MarkedSpace::sweep):
(JSC):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::~JSGlobalData):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/IncrementalSweeper.cpp

    r124123 r124141  
    7070}
    7171
    72 bool IncrementalSweeper::structuresCanBeSwept()
    73 {
    74     ASSERT(m_currentBlockToSweepIndex <= m_blocksToSweep.size());
    75     return !m_blocksToSweep.size() || m_currentBlockToSweepIndex >= m_blocksToSweep.size();
    76 }
    77 
    7872void IncrementalSweeper::doSweep(double sweepBeginTime)
    7973{
    8074    while (m_currentBlockToSweepIndex < m_blocksToSweep.size()) {
    81         MarkedBlock* block = m_blocksToSweep[m_currentBlockToSweepIndex];
    82         if (block->onlyContainsStructures()) {
    83             m_currentBlockToSweepIndex++;
    84             continue;
    85         }
    86 
    87         m_blocksToSweep[m_currentBlockToSweepIndex++] = 0;
    88 
    89         if (!block->needsSweeping())
    90             continue;
    91 
    92         block->sweep();
    93         m_globalData->heap.objectSpace().freeOrShrinkBlock(block);
    94 
    95         CFTimeInterval elapsedTime = WTF::monotonicallyIncreasingTime() - sweepBeginTime;
    96         if (elapsedTime < sweepTimeSlice)
    97             continue;
    98 
    99         scheduleTimer();
    100         return;
    101     }
    102 
    103     while (m_currentStructureBlockToSweepIndex < m_blocksToSweep.size()) {
    104         MarkedBlock* block = m_blocksToSweep[m_currentStructureBlockToSweepIndex];
    105         if (!block) {
    106             m_currentStructureBlockToSweepIndex++;
    107             continue;
    108         }
    109 
    110         m_blocksToSweep[m_currentStructureBlockToSweepIndex++] = 0;
    111 
     75        MarkedBlock* block = m_blocksToSweep[m_currentBlockToSweepIndex++];
    11276        if (!block->needsSweeping())
    11377            continue;
     
    13296    WTF::copyToVector(blockSnapshot, m_blocksToSweep);
    13397    m_currentBlockToSweepIndex = 0;
    134     m_currentStructureBlockToSweepIndex = 0;
    13598    scheduleTimer();
    136 }
    137 
    138 void IncrementalSweeper::willFinishSweeping()
    139 {
    140     m_currentBlockToSweepIndex = m_currentStructureBlockToSweepIndex = 0;
    141     m_blocksToSweep.clear();
    142     if (m_globalData)
    143         cancelTimer();
    14499}
    145100
     
    148103IncrementalSweeper::IncrementalSweeper(JSGlobalData* globalData)
    149104    : HeapTimer(globalData)
    150     , m_structuresCanBeSwept(false)
    151105{
    152106}
     
    161115}
    162116
    163 bool IncrementalSweeper::structuresCanBeSwept()
    164 {
    165     return m_structuresCanBeSwept;
    166 }
    167 
    168117void IncrementalSweeper::startSweeping(const HashSet<MarkedBlock*>&)
    169118{
    170     m_structuresCanBeSwept = false;
    171119}
    172 
    173 void IncrementalSweeper::willFinishSweeping()
    174 {
    175     m_structuresCanBeSwept = true;
    176 }
    177 
     120   
    178121#endif
    179122
Note: See TracChangeset for help on using the changeset viewer.