Changeset 51971 in webkit for trunk/JavaScriptCore/runtime/JSObject.cpp
- Timestamp:
- Dec 10, 2009, 4:06:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSObject.cpp
r51801 r51971 407 407 bool JSObject::propertyIsEnumerable(ExecState* exec, const Identifier& propertyName) const 408 408 { 409 unsigned attributes;410 if (! getPropertyAttributes(exec, propertyName, attributes))409 PropertyDescriptor descriptor; 410 if (!const_cast<JSObject*>(this)->getOwnPropertyDescriptor(exec, propertyName, descriptor)) 411 411 return false; 412 return !(attributes & DontEnum); 413 } 414 415 bool JSObject::getPropertyAttributes(ExecState* exec, const Identifier& propertyName, unsigned& attributes) const 416 { 417 JSCell* specificValue; 418 if (m_structure->get(propertyName, attributes, specificValue) != WTF::notFound) 419 return true; 420 421 // Look in the static hashtable of properties 422 const HashEntry* entry = findPropertyHashEntry(exec, propertyName); 423 if (entry) { 424 attributes = entry->attributes(); 425 return true; 426 } 427 428 return false; 412 return descriptor.enumerable(); 429 413 } 430 414
Note:
See TracChangeset
for help on using the changeset viewer.