Ignore:
Timestamp:
Dec 18, 2013, 8:30:02 PM (12 years ago)
Author:
[email protected]
Message:

DelayedReleaseScope is in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=125876

Reviewed by Geoffrey Garen.

The DelayedReleaseScope needs to be around the free list sweeping in MarkedAllocator::tryAllocateHelper.
This location gives us a good safe point between getting ready to allocate (i.e. identifying a non-empty
free list) and doing the actual allocation (popping the free list).

  • heap/MarkedAllocator.cpp:

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

  • runtime/JSCellInlines.h:

(JSC::allocateCell):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSCellInlines.h

    r157539 r160822  
    8989    ASSERT(!DisallowGC::isGCDisallowedOnCurrentThread());
    9090    ASSERT(size >= sizeof(T));
    91 #if ENABLE(GC_VALIDATION)
    92     ASSERT(!heap.vm()->isInitializingObject());
    93     heap.vm()->setInitializingObjectClass(T::info());
    94 #endif
    9591    JSCell* result = 0;
    9692    if (T::needsDestruction && T::hasImmortalStructure)
     
    10096    else
    10197        result = static_cast<JSCell*>(heap.allocateWithoutDestructor(size));
     98#if ENABLE(GC_VALIDATION)
     99    ASSERT(!heap.vm()->isInitializingObject());
     100    heap.vm()->setInitializingObjectClass(T::info());
     101#endif
    102102    result->clearStructure();
    103103    return result;
Note: See TracChangeset for help on using the changeset viewer.