Changeset 96354 in webkit


Ignore:
Timestamp:
Sep 29, 2011 1:45:52 PM (13 years ago)
Author:
fpizlo@apple.com
Message:

Structure transitions involving many (> 64) properties sometimes cause structure corruption
https://bugs.webkit.org/show_bug.cgi?id=69102

Reviewed by Darin Adler.

Made m_offset an int instead of a signed char. Changed the code to ensure that transitions
don't lead to the dictionary kind being forgotten.

  • runtime/Structure.cpp:

(JSC::Structure::Structure):

  • runtime/Structure.h:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r96347 r96354  
     12011-09-29  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Structure transitions involving many (> 64) properties sometimes cause structure corruption
     4        https://bugs.webkit.org/show_bug.cgi?id=69102
     5
     6        Reviewed by Darin Adler.
     7       
     8        Made m_offset an int instead of a signed char. Changed the code to ensure that transitions
     9        don't lead to the dictionary kind being forgotten.
     10       
     11        * runtime/Structure.cpp:
     12        (JSC::Structure::Structure):
     13        * runtime/Structure.h:
     14
    1152011-09-29  Yuqiang Xian  <yuqiang.xian@intel.com>
    216
  • trunk/Source/JavaScriptCore/runtime/Structure.cpp

    r96346 r96354  
    203203    , m_propertyStorageCapacity(previous->m_propertyStorageCapacity)
    204204    , m_offset(noOffset)
    205     , m_dictionaryKind(NoneDictionaryKind)
     205    , m_dictionaryKind(previous->m_dictionaryKind)
    206206    , m_isPinnedPropertyTable(false)
    207207    , m_hasGetterSetterProperties(previous->m_hasGetterSetterProperties)
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r96346 r96354  
    238238        bool isValid(ExecState*, StructureChain* cachedPrototypeChain) const;
    239239
    240         static const signed char s_maxTransitionLength = 64;
    241 
    242         static const signed char noOffset = -1;
     240        static const int s_maxTransitionLength = 64;
     241
     242        static const int noOffset = -1;
    243243
    244244        static const unsigned maxSpecificFunctionThrashCount = 3;
     
    265265
    266266        // m_offset does not account for anonymous slots
    267         signed char m_offset;
     267        int m_offset;
    268268
    269269        unsigned m_dictionaryKind : 2;
Note: See TracChangeset for help on using the changeset viewer.