Changeset 53170 in webkit for trunk/JavaScriptCore/runtime/JSObject.cpp
- Timestamp:
- Jan 12, 2010, 4:58:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSObject.cpp
r51971 r53170 43 43 ASSERT_CLASS_FITS_IN_CELL(JSObject); 44 44 45 static inline void get EnumerablePropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames)45 static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames, EnumerationMode mode) 46 46 { 47 47 // Add properties from the static hashtables of properties … … 56 56 const HashEntry* entry = table->table; 57 57 for (int i = 0; i <= hashSizeMask; ++i, ++entry) { 58 if (entry->key() && !(entry->attributes() & DontEnum))58 if (entry->key() && (!(entry->attributes() & DontEnum) || (mode == IncludeDontEnumProperties))) 59 59 propertyNames.add(entry->key()); 60 60 } … … 426 426 } 427 427 428 void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames )429 { 430 getOwnPropertyNames(exec, propertyNames );428 void JSObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) 429 { 430 getOwnPropertyNames(exec, propertyNames, mode); 431 431 432 432 if (prototype().isNull()) … … 436 436 while(1) { 437 437 if (prototype->structure()->typeInfo().overridesGetPropertyNames()) { 438 prototype->getPropertyNames(exec, propertyNames );438 prototype->getPropertyNames(exec, propertyNames, mode); 439 439 break; 440 440 } 441 prototype->getOwnPropertyNames(exec, propertyNames );441 prototype->getOwnPropertyNames(exec, propertyNames, mode); 442 442 JSValue nextProto = prototype->prototype(); 443 443 if (nextProto.isNull()) … … 447 447 } 448 448 449 void JSObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames )450 { 451 m_structure->get EnumerablePropertyNames(propertyNames);452 get EnumerablePropertyNames(exec, classInfo(), propertyNames);449 void JSObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) 450 { 451 m_structure->getPropertyNames(propertyNames, mode); 452 getClassPropertyNames(exec, classInfo(), propertyNames, mode); 453 453 } 454 454
Note:
See TracChangeset
for help on using the changeset viewer.