Changeset 50320 in webkit for trunk/JavaScriptCore


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.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r50265 r50320  
     12009-10-29  Oliver Hunt  <[email protected]>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
     6        https://bugs.webkit.org/show_bug.cgi?id=30947
     7        <rdar://problem/7348833>
     8
     9        The logic for flagging that a structure has non-enumerable properties
     10        was in addPropertyWithoutTransition, rather than in the core Structure::put
     11        method.  Despite this I was unable to produce a testcase that caused
     12        the failure that etrade was experiencing, but the new assertion in
     13        getEnumerablePropertyNames triggers on numerous layout tests without
     14        the fix, so in effecti all for..in enumeration in any test ends up
     15        doing the required consistency check.
     16
     17        * runtime/Structure.cpp:
     18        (JSC::Structure::addPropertyWithoutTransition):
     19        (JSC::Structure::put):
     20        (JSC::Structure::getEnumerablePropertyNames):
     21        (JSC::Structure::checkConsistency):
     22
    1232009-10-29  Gabor Loki  <[email protected]>
    224
  • 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.