src/3rdparty/webkit/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 30 5dc02b23752f
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    41             o->structure()->enumerationCache()->cachedStructure() != o->structure() ||
    41             o->structure()->enumerationCache()->cachedStructure() != o->structure() ||
    42             o->structure()->enumerationCache()->cachedPrototypeChain() != o->structure()->prototypeChain(exec));
    42             o->structure()->enumerationCache()->cachedPrototypeChain() != o->structure()->prototypeChain(exec));
    43 
    43 
    44     PropertyNameArray propertyNames(exec);
    44     PropertyNameArray propertyNames(exec);
    45     o->getPropertyNames(exec, propertyNames);
    45     o->getPropertyNames(exec, propertyNames);
    46     JSPropertyNameIterator* jsPropertyNameIterator = new (exec) JSPropertyNameIterator(exec, propertyNames.data());
    46     size_t numCacheableSlots = 0;
       
    47     if (!o->structure()->hasNonEnumerableProperties() && !o->structure()->hasAnonymousSlots() &&
       
    48         !o->structure()->isUncacheableDictionary() && !o->structure()->typeInfo().overridesGetPropertyNames())
       
    49         numCacheableSlots = o->structure()->propertyStorageSize();
       
    50 
       
    51     JSPropertyNameIterator* jsPropertyNameIterator = new (exec) JSPropertyNameIterator(exec, propertyNames.data(), numCacheableSlots);
    47 
    52 
    48     if (o->structure()->isDictionary())
    53     if (o->structure()->isDictionary())
    49         return jsPropertyNameIterator;
    54         return jsPropertyNameIterator;
    50 
    55 
    51     if (o->structure()->typeInfo().overridesGetPropertyNames())
    56     if (o->structure()->typeInfo().overridesGetPropertyNames())