Changeset 9889 in webkit for trunk/JavaScriptCore/bindings/runtime_object.cpp
- Timestamp:
- Jul 25, 2005, 3:17:20 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bindings/runtime_object.cpp
r9582 r9889 61 61 } 62 62 63 Value RuntimeObjectImp::get(ExecState *exec, const Identifier &propertyName) const63 bool RuntimeObjectImp::getOwnProperty(ExecState *exec, const Identifier& propertyName, Value& result) const 64 64 { 65 Value result = Undefined();66 67 65 instance->begin(); 68 66 … … 70 68 71 69 if (aClass) { 72 73 70 // See if the instance have a field with the specified name. 74 71 Field *aField = aClass->fieldNamed(propertyName.ascii(), instance); 75 72 if (aField) { 76 result = instance->getValueOfField 77 }78 else {73 result = instance->getValueOfField(exec, aField); 74 return true; 75 } else { 79 76 // Now check if a method with specified name exists, if so return a function object for 80 77 // that method. 81 78 MethodList methodList = aClass->methodsNamed(propertyName.ascii(), instance); 82 79 if (methodList.length() > 0) { 83 result = Object (new RuntimeMethodImp(exec, propertyName, methodList)); 80 result = Object(new RuntimeMethodImp(exec, propertyName, methodList)); 81 return true; 84 82 } 85 83 } … … 87 85 if (result.type() == UndefinedType) { 88 86 // Try a fallback object. 89 result = aClass->fallbackObject (exec, instance, propertyName); 87 result = aClass->fallbackObject(exec, instance, propertyName); 88 return true; 90 89 } 91 90 } … … 93 92 instance->end(); 94 93 95 96 return result;94 // don't call superclass, because runtime objects can't have custom properties or a prototype 95 return false; 97 96 } 98 97
Note:
See TracChangeset
for help on using the changeset viewer.