Ignore:
Timestamp:
Aug 3, 2010, 3:55:34 PM (15 years ago)
Author:
[email protected]
Message:

Fixed a crash seen on the GTK 64bit buildbot.

Reviewed by Oliver Hunt.

When JSArray is allocated for the vptr stealing hack, it's not allocated
in the heap, so the JSArray constructor can't safely call Heap::heap().

Since this was subtle enough to confuse smart people, I've changed JSArray
to have an explicit vptr stealing constructor.

(JSC::JSArray::JSArray):

  • runtime/JSArray.h:

(JSC::JSArray::):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::storeVPtrs):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSArray.h

    r64588 r64602  
    6363
    6464    public:
     65        enum VPtrStealingHackType { VPtrStealingHack };
     66        JSArray(VPtrStealingHackType);
     67
    6568        explicit JSArray(NonNullPassRefPtr<Structure>);
    6669        JSArray(NonNullPassRefPtr<Structure>, unsigned initialLength, ArrayCreationMode);
Note: See TracChangeset for help on using the changeset viewer.