summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-06-24 15:17:08 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-06-24 15:17:08 (GMT)
commit962d3938380dde01e2bd4915c51c95f47fafa0ec (patch)
tree24524e62fa3c40930a0c6335bfab4d1276aa3f22 /src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp
parentf98829ae299e1f3c1f21b4bf2628601008e5141a (diff)
parentdab9d7c67ed2eda150c8da9e41db75f7eeeecd0d (diff)
downloadQt-962d3938380dde01e2bd4915c51c95f47fafa0ec.zip
Qt-962d3938380dde01e2bd4915c51c95f47fafa0ec.tar.gz
Qt-962d3938380dde01e2bd4915c51c95f47fafa0ec.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp
index 3597a5c..5dfd919 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp
@@ -306,8 +306,11 @@ void Structure::getEnumerablePropertyNames(ExecState* exec, PropertyNameArray& p
}
if (shouldCache) {
+ StructureChain* protoChain = prototypeChain(exec);
m_cachedPropertyNameArrayData = propertyNames.data();
- m_cachedPropertyNameArrayData->setCachedPrototypeChain(prototypeChain(exec));
+ if (!protoChain->isCacheable())
+ return;
+ m_cachedPropertyNameArrayData->setCachedPrototypeChain(protoChain);
m_cachedPropertyNameArrayData->setCachedStructure(this);
}
}
@@ -407,6 +410,7 @@ PassRefPtr<Structure> Structure::addPropertyTransition(Structure* structure, con
if (structure->transitionCount() > s_maxTransitionLength) {
RefPtr<Structure> transition = toDictionaryTransition(structure);
+ ASSERT(structure != transition);
offset = transition->put(propertyName, attributes, specificValue);
if (transition->propertyStorageSize() > transition->propertyStorageCapacity())
transition->growPropertyStorageCapacity();