Ignore:
Timestamp:
Oct 30, 2009, 12:13:38 AM (16 years ago)
Author:
[email protected]
Message:

REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
https://bugs.webkit.org/show_bug.cgi?id=30947
<rdar://problem/7348833>

Reviewed by Maciej Stachowiak

The logic for flagging that a structure has non-enumerable properties
was in addPropertyWithoutTransition, rather than in the core Structure::put
method. Despite this I was unable to produce a testcase that caused
the failure that etrade was experiencing, but the new assertion in
getEnumerablePropertyNames triggers on numerous layout tests without
the fix, so in effecti all for..in enumeration in any test ends up
doing the required consistency check.

File:
1 edited

Legend:

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

    r50254 r50320  
    557557
    558558    m_isPinnedPropertyTable = true;
    559     if (attributes & DontEnum)
    560         m_hasNonEnumerableProperties = true;
    561559
    562560    size_t offset = put(propertyName, attributes, specificValue);
     
    739737
    740738    checkConsistency();
     739
     740    if (attributes & DontEnum)
     741        m_hasNonEnumerableProperties = true;
    741742
    742743    UString::Rep* rep = propertyName._ustring.rep();
     
    10261027        unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount;
    10271028        for (unsigned k = 1; k <= entryCount; k++) {
     1029            ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[k].attributes & DontEnum));
    10281030            if (m_propertyTable->entries()[k].key && !(m_propertyTable->entries()[k].attributes & DontEnum)) {
    10291031                PropertyMapEntry* value = &m_propertyTable->entries()[k];
     
    11131115    unsigned nonEmptyEntryCount = 0;
    11141116    for (unsigned c = 1; c <= m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; ++c) {
     1117        ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[c].attributes & DontEnum));
    11151118        UString::Rep* rep = m_propertyTable->entries()[c].key;
    11161119        if (!rep)
Note: See TracChangeset for help on using the changeset viewer.