Changeset 83107 in webkit


Ignore:
Timestamp:
Apr 6, 2011 3:15:11 PM (13 years ago)
Author:
oliver@apple.com
Message:

2011-04-06 Oliver Hunt <oliver@apple.com>

Reviewed by Gavin Barraclough.

Stop JSObject::isUsingInlineStorage() from using the structure
https://bugs.webkit.org/show_bug.cgi?id=57986

Make the isUsingInlineStorage() implementation just look at
whether the property storage is inside the object.

  • runtime/JSObject.h: (JSC::JSObject::isUsingInlineStorage): (JSC::JSObject::JSObject):
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r83106 r83107  
     12011-04-06  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Stop JSObject::isUsingInlineStorage() from using the structure
     6        https://bugs.webkit.org/show_bug.cgi?id=57986
     7
     8        Make the isUsingInlineStorage() implementation just look at
     9        whether the property storage is inside the object.
     10
     11        * runtime/JSObject.h:
     12        (JSC::JSObject::isUsingInlineStorage):
     13        (JSC::JSObject::JSObject):
     14
    1152011-04-06  Gavin Barraclough  <barraclough@apple.com>
    216
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r82849 r83107  
    221221
    222222        void allocatePropertyStorage(size_t oldSize, size_t newSize);
    223         bool isUsingInlineStorage() const { return m_structure->isUsingInlineStorage(); }
     223        bool isUsingInlineStorage() const { return static_cast<const void*>(m_propertyStorage) == static_cast<const void*>(this + 1); }
    224224
    225225        static const unsigned baseExternalStorageCapacity = 16;
     
    402402    ASSERT(m_structure->isEmpty());
    403403    ASSERT(prototype().isNull() || Heap::heap(this) == Heap::heap(prototype()));
     404    ASSERT(static_cast<void*>(inlineStorage) == static_cast<void*>(this + 1));
    404405}
    405406
Note: See TracChangeset for help on using the changeset viewer.