Changeset 162713 in webkit for trunk/Source/JavaScriptCore/runtime/Structure.cpp
- Timestamp:
- Jan 24, 2014, 12:03:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r161309 r162713 166 166 , m_dictionaryKind(NoneDictionaryKind) 167 167 , m_isPinnedPropertyTable(false) 168 , m_hasGetterSetterProperties( false)169 , m_hasReadOnlyOrGetterSetterPropertiesExcludingProto( false)168 , m_hasGetterSetterProperties(classInfo->hasStaticSetterOrReadonlyProperties(vm)) 169 , m_hasReadOnlyOrGetterSetterPropertiesExcludingProto(classInfo->hasStaticSetterOrReadonlyProperties(vm)) 170 170 , m_hasNonEnumerableProperties(false) 171 171 , m_attributesInPrevious(0) … … 178 178 ASSERT(static_cast<PropertyOffset>(inlineCapacity) < firstOutOfLineOffset); 179 179 ASSERT(!typeInfo.structureHasRareData()); 180 ASSERT(hasReadOnlyOrGetterSetterPropertiesExcludingProto() || !m_classInfo->hasStaticSetterOrReadonlyProperties(vm)); 181 ASSERT(hasGetterSetterProperties() || !m_classInfo->hasStaticSetterOrReadonlyProperties(vm)); 180 182 } 181 183 … … 193 195 , m_dictionaryKind(NoneDictionaryKind) 194 196 , m_isPinnedPropertyTable(false) 195 , m_hasGetterSetterProperties( false)196 , m_hasReadOnlyOrGetterSetterPropertiesExcludingProto( false)197 , m_hasGetterSetterProperties(m_classInfo->hasStaticSetterOrReadonlyProperties(vm)) 198 , m_hasReadOnlyOrGetterSetterPropertiesExcludingProto(m_classInfo->hasStaticSetterOrReadonlyProperties(vm)) 197 199 , m_hasNonEnumerableProperties(false) 198 200 , m_attributesInPrevious(0) … … 202 204 , m_staticFunctionReified(false) 203 205 { 206 ASSERT(hasReadOnlyOrGetterSetterPropertiesExcludingProto() || !m_classInfo->hasStaticSetterOrReadonlyProperties(vm)); 207 ASSERT(hasGetterSetterProperties() || !m_classInfo->hasStaticSetterOrReadonlyProperties(vm)); 204 208 } 205 209 … … 232 236 if (previous->m_globalObject) 233 237 m_globalObject.set(vm, this, previous->m_globalObject.get()); 238 ASSERT(hasReadOnlyOrGetterSetterPropertiesExcludingProto() || !m_classInfo->hasStaticSetterOrReadonlyProperties(vm)); 239 ASSERT(hasGetterSetterProperties() || !m_classInfo->hasStaticSetterOrReadonlyProperties(vm)); 234 240 } 235 241 … … 566 572 } 567 573 574 ASSERT(transition->hasReadOnlyOrGetterSetterPropertiesExcludingProto() || !transition->classInfo()->hasStaticSetterOrReadonlyProperties(vm)); 575 ASSERT(transition->hasGetterSetterProperties() || !transition->classInfo()->hasStaticSetterOrReadonlyProperties(vm)); 568 576 transition->checkOffsetConsistency(); 569 577 return transition; … … 1157 1165 #endif // DO_PROPERTYMAP_CONSTENCY_CHECK 1158 1166 1167 bool ClassInfo::hasStaticSetterOrReadonlyProperties(VM& vm) const 1168 { 1169 for (const ClassInfo* ci = this; ci; ci = ci->parentClass) { 1170 if (const HashTable* table = ci->propHashTable(vm)) { 1171 if (table->hasSetterOrReadonlyProperties) 1172 return true; 1173 } 1174 } 1175 return false; 1176 } 1177 1159 1178 } // namespace JSC
Note:
See TracChangeset
for help on using the changeset viewer.