Changeset 9455 in webkit for trunk/JavaScriptCore/kjs/object.cpp
- Timestamp:
- Jun 21, 2005, 5:48:49 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.cpp
r9441 r9455 283 283 bool ObjectImp::hasProperty(ExecState *exec, const Identifier &propertyName) const 284 284 { 285 if (hasOwnProperty(exec, propertyName))286 return true;287 288 if (_proto->dispatchType() != ObjectType) {289 return false;290 }291 292 // Look in the prototype293 return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName);294 }295 296 bool ObjectImp::hasProperty(ExecState *exec, unsigned propertyName) const297 {298 if (hasOwnProperty(exec, propertyName))299 return true;300 301 if (_proto->dispatchType() != ObjectType) {302 return false;303 }304 305 // Look in the prototype306 return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName);307 }308 309 bool ObjectImp::hasOwnProperty(ExecState *exec, const Identifier &propertyName) const310 {311 285 if (_prop.get(propertyName)) 312 286 return true; … … 314 288 // Look in the static hashtable of properties 315 289 if (findPropertyHashEntry(propertyName)) 316 return true;290 return true; 317 291 318 292 // non-standard netscape extension … … 320 294 return true; 321 295 322 return false; 323 } 324 325 bool ObjectImp::hasOwnProperty(ExecState *exec, unsigned propertyName) const 326 { 327 return hasOwnProperty(exec, Identifier::from(propertyName)); 328 } 329 296 if (_proto->dispatchType() != ObjectType) { 297 return false; 298 } 299 300 // Look in the prototype 301 return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName); 302 } 303 304 bool ObjectImp::hasProperty(ExecState *exec, unsigned propertyName) const 305 { 306 return hasProperty(exec, Identifier::from(propertyName)); 307 } 330 308 331 309 // ECMA 8.6.2.5
Note:
See TracChangeset
for help on using the changeset viewer.