summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSObject.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/JSObject.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/runtime/JSObject.cpp b/Source/JavaScriptCore/runtime/JSObject.cpp
index 32adefd2f..72cbb022a 100644
--- a/Source/JavaScriptCore/runtime/JSObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSObject.cpp
@@ -1513,7 +1513,10 @@ void JSObject::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNa
void JSObject::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
getClassPropertyNames(exec, object->classInfo(), propertyNames, mode, object->staticFunctionsReified());
+ size_t preStructurePropertyNamesCount = propertyNames.size();
object->structure()->getPropertyNamesFromStructure(exec->globalData(), propertyNames, mode);
+ size_t numCacheableSlots = preStructurePropertyNamesCount ? 0 : propertyNames.size();
+ propertyNames.setNumCacheableSlots(numCacheableSlots);
}
double JSObject::toNumber(ExecState* exec) const