Changeset 98123 in webkit for trunk/Source/JavaScriptCore/heap


Ignore:
Timestamp:
Oct 21, 2011, 12:36:46 PM (14 years ago)
Author:
[email protected]
Message:

Add finalizer to JSObject
https://bugs.webkit.org/show_bug.cgi?id=70336

Reviewed by Darin Adler.

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::callDestructor): Skip the call to the destructor
if we're a JSFinalObject, since the finalizer takes care of things.

  • runtime/JSCell.h:

(JSC::JSCell::~JSCell): Remove the GC validation due to a conflict with
future changes and the fact that we no longer always call the destructor, making
the information provided less useful.

  • runtime/JSObject.cpp:

(JSC::JSObject::finalize): Add finalizer for JSObject.
(JSC::JSObject::allocatePropertyStorage): The first time we need to allocate out-of-line
property storage, we add a finalizer to ourself.

  • runtime/JSObject.h:
File:
1 edited

Legend:

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

    r95914 r98123  
    7171    m_heap->m_destroyedTypeCounts.countVPtr(vptr);
    7272#endif
    73     if (vptr == jsFinalObjectVPtr)
    74         reinterpret_cast<JSFinalObject*>(cell)->JSFinalObject::~JSFinalObject();
    75     else
     73    if (vptr != jsFinalObjectVPtr)
    7674        cell->~JSCell();
    7775
Note: See TracChangeset for help on using the changeset viewer.