Changeset 9582 in webkit for trunk/JavaScriptCore/kjs/object.cpp
- Timestamp:
- Jul 3, 2005, 3:47:58 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.cpp
r9526 r9582 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 prototype 293 return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName); 294 } 295 296 bool ObjectImp::hasProperty(ExecState *exec, unsigned propertyName) const 297 { 298 if (hasOwnProperty(exec, propertyName)) 299 return true; 300 301 if (_proto->dispatchType() != ObjectType) { 302 return false; 303 } 304 305 // Look in the prototype 306 return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName); 307 } 308 309 bool ObjectImp::hasOwnProperty(ExecState *exec, const Identifier &propertyName) const 310 { 285 311 if (_prop.get(propertyName)) 286 312 return true; … … 288 314 // Look in the static hashtable of properties 289 315 if (findPropertyHashEntry(propertyName)) 290 316 return true; 291 317 292 318 // non-standard netscape extension … … 294 320 return true; 295 321 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 } 322 return false; 323 } 324 325 bool ObjectImp::hasOwnProperty(ExecState *exec, unsigned propertyName) const 326 { 327 return hasOwnProperty(exec, Identifier::from(propertyName)); 328 } 329 308 330 309 331 // ECMA 8.6.2.5
Note:
See TracChangeset
for help on using the changeset viewer.