Ignore:
Timestamp:
Aug 10, 2011, 12:52:27 PM (14 years ago)
Author:
[email protected]
Message:

Make GC checks more aggressive in release builds
https://bugs.webkit.org/show_bug.cgi?id=66001

Reviewed by Gavin Barraclough.

../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:

  • heap/HandleHeap.cpp:

(JSC::HandleHeap::visitStrongHandles):
(JSC::HandleHeap::visitWeakHandles):
(JSC::HandleHeap::finalizeWeakHandles):
(JSC::HandleHeap::writeBarrier):
(JSC::HandleHeap::isLiveNode):
(JSC::HandleHeap::isValidWeakNode):

Increase handle heap validation logic, and make some of
the crashes trigger in release builds as well as debug.

  • heap/HandleHeap.h:

(JSC::HandleHeap::allocate):
(JSC::HandleHeap::makeWeak):

Ditto

  • runtime/JSGlobalData.cpp:

(WTF::Recompiler::operator()):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::visitChildren):

Fix GC bugs found while testing this patch

../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:

Fix GC bugs found while testing increased validation logic

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::JSDOMWindowShell):

  • bindings/js/JSDOMWindowShell.h:
  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::createWindowShell):

  • bridge/objc/ObjCRuntimeObject.h:

(JSC::Bindings::ObjCRuntimeObject::create):

  • bridge/objc/ObjCRuntimeObject.mm:

(JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):

  • bridge/objc/objc_instance.mm:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/HandleHeap.h

    r89077 r92788  
    114114    void grow();
    115115   
    116 #if !ASSERT_DISABLED
     116#if ENABLE(GC_VALIDATION) || !ASSERT_DISABLED
    117117    bool isValidWeakNode(Node*);
     118    bool isLiveNode(Node*);
    118119#endif
    119120
     
    150151inline HandleSlot HandleHeap::allocate()
    151152{
     153    // Forbid assignment to handles during the finalization phase, since it would violate many GC invariants.
     154    // File a bug with stack trace if you hit this.
     155    if (m_nextToFinalize)
     156        CRASH();
    152157    if (m_freeList.isEmpty())
    153158        grow();
     
    182187inline void HandleHeap::makeWeak(HandleSlot handle, WeakHandleOwner* weakOwner, void* context)
    183188{
     189    // Forbid assignment to handles during the finalization phase, since it would violate many GC invariants.
     190    // File a bug with stack trace if you hit this.
     191    if (m_nextToFinalize)
     192        CRASH();
    184193    Node* node = toNode(handle);
    185194    node->makeWeak(weakOwner, context);
Note: See TracChangeset for help on using the changeset viewer.