Changeset 38750 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Nov 25, 2008, 2:05:51 AM (17 years ago)
Author:
[email protected]
Message:

2008-11-25 Cameron Zwarich <[email protected]>

Reviewed by Alexey Proskuryakov.

Move the collect() call in Heap::heapAllocate() that is conditionally
compiled under COLLECT_ON_EVERY_ALLOCATION so that it is before we get
information about the heap. This was causing assertion failures for me
while I was reducing a bug.

  • runtime/Collector.cpp: (JSC::Heap::heapAllocate):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r38673 r38750  
    288288    // deallocation code.
    289289
     290#if COLLECT_ON_EVERY_ALLOCATION
     291    collect();
     292#endif
     293
    290294    size_t numLiveObjects = heap.numLiveObjects;
    291295    size_t usedBlocks = heap.usedBlocks;
    292296    size_t i = heap.firstBlockWithPossibleSpace;
    293 
    294 #if COLLECT_ON_EVERY_ALLOCATION
    295     collect();
    296 #endif
    297297
    298298    // if we have a huge amount of extra cost, we'll try to collect even if we still have
Note: See TracChangeset for help on using the changeset viewer.