Ignore:
Timestamp:
Jun 23, 2009, 7:47:48 PM (16 years ago)
Author:
[email protected]
Message:

<rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
<https://bugs.webkit.org/show_bug.cgi?id=26593>

Reviewed by Gavin Barraclough.

Add tests to ensure we correctly invalidate caching that depends on structure chains
that include dictionaries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Structure.cpp

    r44171 r45039  
    307307
    308308    if (shouldCache) {
     309        StructureChain* protoChain = prototypeChain(exec);
    309310        m_cachedPropertyNameArrayData = propertyNames.data();
    310         m_cachedPropertyNameArrayData->setCachedPrototypeChain(prototypeChain(exec));
     311        if (!protoChain->isCacheable())
     312            return;
     313        m_cachedPropertyNameArrayData->setCachedPrototypeChain(protoChain);
    311314        m_cachedPropertyNameArrayData->setCachedStructure(this);
    312315    }
     
    408411    if (structure->transitionCount() > s_maxTransitionLength) {
    409412        RefPtr<Structure> transition = toDictionaryTransition(structure);
     413        ASSERT(structure != transition);
    410414        offset = transition->put(propertyName, attributes, specificValue);
    411415        if (transition->propertyStorageSize() > transition->propertyStorageCapacity())
Note: See TracChangeset for help on using the changeset viewer.