Ignore:
Timestamp:
Nov 17, 2011, 2:04:07 PM (14 years ago)
Author:
[email protected]
Message:

Add finalizer to JSActivation
https://bugs.webkit.org/show_bug.cgi?id=72575

Reviewed by Geoffrey Garen.

  • runtime/JSActivation.cpp:

(JSC::JSActivation::finishCreation): Attach finalize function to objects during creation.
(JSC::JSActivation::finalize):

  • runtime/JSActivation.h: Replaced virtual destructor with static finalize function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSActivation.cpp

    r100006 r100672  
    5757    // doesn't know about SharedSymbolTable
    5858    static_cast<SharedSymbolTable*>(m_symbolTable)->ref();
    59 }
    60 
    61 JSActivation::~JSActivation()
    62 {
    63     static_cast<SharedSymbolTable*>(m_symbolTable)->deref();
     59    callFrame->globalData().heap.addFinalizer(this, &finalize);
     60}
     61
     62void JSActivation::finalize(JSCell* cell)
     63{
     64    static_cast<SharedSymbolTable*>(jsCast<JSActivation*>(cell)->m_symbolTable)->deref();
    6465}
    6566
Note: See TracChangeset for help on using the changeset viewer.