Commit 71758443 authored by oliver@apple.com's avatar oliver@apple.com

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 079776af
2009-10-29 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
https://bugs.webkit.org/show_bug.cgi?id=30947
<rdar://problem/7348833>
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.
* runtime/Structure.cpp:
(JSC::Structure::addPropertyWithoutTransition):
(JSC::Structure::put):
(JSC::Structure::getEnumerablePropertyNames):
(JSC::Structure::checkConsistency):
2009-10-29 Gabor Loki <loki@inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
......
......@@ -556,8 +556,6 @@ size_t Structure::addPropertyWithoutTransition(const Identifier& propertyName, u
materializePropertyMapIfNecessary();
m_isPinnedPropertyTable = true;
if (attributes & DontEnum)
m_hasNonEnumerableProperties = true;
size_t offset = put(propertyName, attributes, specificValue);
if (propertyStorageSize() > propertyStorageCapacity())
......@@ -739,6 +737,9 @@ size_t Structure::put(const Identifier& propertyName, unsigned attributes, JSCel
checkConsistency();
if (attributes & DontEnum)
m_hasNonEnumerableProperties = true;
UString::Rep* rep = propertyName._ustring.rep();
if (!m_propertyTable)
......@@ -1025,6 +1026,7 @@ void Structure::getEnumerablePropertyNames(PropertyNameArray& propertyNames)
int i = 0;
unsigned entryCount = m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount;
for (unsigned k = 1; k <= entryCount; k++) {
ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[k].attributes & DontEnum));
if (m_propertyTable->entries()[k].key && !(m_propertyTable->entries()[k].attributes & DontEnum)) {
PropertyMapEntry* value = &m_propertyTable->entries()[k];
int j;
......@@ -1112,6 +1114,7 @@ void Structure::checkConsistency()
unsigned nonEmptyEntryCount = 0;
for (unsigned c = 1; c <= m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; ++c) {
ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[c].attributes & DontEnum));
UString::Rep* rep = m_propertyTable->entries()[c].key;
if (!rep)
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment