Ignore:
Timestamp:
Aug 1, 2012, 12:24:58 PM (13 years ago)
Author:
[email protected]
Message:

C++ code should get ClassInfo from the Structure
https://bugs.webkit.org/show_bug.cgi?id=92892

Reviewed by Geoffrey Garen.

In our march to remove ClassInfo from our JSCell object headers, we can switch
C++ code over to grabbing the ClassInfo from the Structure since it is finally
safe to do so now that Structure access is safe during finalization/destruction.
The remaining JIT code changes can be done in a separate patch.

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::callDestructor): We don't want to clear the Structure any more
since the Structure should still be valid at this point.

  • heap/WeakSetInlines.h:

(JSC::WeakBlock::finalize): Ditto.

  • runtime/JSCell.h:

(JSC):

  • runtime/Structure.h:

(JSC::JSCell::classInfo): Move JSCell's classInfo() to Structure.h so it can be
inline. Use a different method of getting the JSCell's Structure based on
whether we're in GC_VALIDATION mode or not, since always using get() will cause
infinite recursion in GC_VALIDATION mode.
(JSC):

File:
1 edited

Legend:

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

    r118616 r124355  
    5050    if (!weakHandleOwner)
    5151        return;
    52 #if !ASSERT_DISABLED || ENABLE(GC_VALIDATION)
    53     weakImpl->jsValue().asCell()->clearStructure();
    54 #endif
    5552    weakHandleOwner->finalize(Handle<Unknown>::wrapSlot(&const_cast<JSValue&>(weakImpl->jsValue())), weakImpl->context());
    5653}
Note: See TracChangeset for help on using the changeset viewer.