Ignore:
Timestamp:
Nov 13, 2012, 11:58:18 AM (13 years ago)
Author:
[email protected]
Message:

JSFunction and its descendants should be destructible
https://bugs.webkit.org/show_bug.cgi?id=102062

Reviewed by Mark Hahnenberg.

This will make it easy to place an InlineWatchpointSet inside JSFunction. In the
future, we could make JSFunction non-destructible again by making a version of
WatchpointSet that is entirely GC'd, but this seems like overkill for now.

This is performance-neutral.

  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::destroy):
(JSC):

  • runtime/JSBoundFunction.h:

(JSBoundFunction):

  • runtime/JSFunction.cpp:

(JSC):
(JSC::JSFunction::destroy):

  • runtime/JSFunction.h:

(JSFunction):

File:
1 edited

Legend:

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

    r131088 r134460  
    4949}
    5050
    51 ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSFunction);
    52 
    5351const ClassInfo JSFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSFunction) };
    5452
     
    7573    function->finishCreation(exec, executable, length, name);
    7674    return function;
     75}
     76
     77void JSFunction::destroy(JSCell* cell)
     78{
     79    static_cast<JSFunction*>(cell)->JSFunction::~JSFunction();
    7780}
    7881
Note: See TracChangeset for help on using the changeset viewer.