Changeset 154300 in webkit for trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
- Timestamp:
- Aug 19, 2013, 2:44:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r154253 r154300 214 214 215 215 template <class Parent> 216 bool JSCallbackObject<Parent>::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor) 217 { 218 JSCallbackObject* thisObject = jsCast<JSCallbackObject*>(object); 219 PropertySlot slot(thisObject); 220 if (thisObject->methodTable()->getOwnPropertySlot(thisObject, exec, propertyName, slot)) { 221 // Ideally we should return an access descriptor, but returning a value descriptor is better than nothing. 222 JSValue value = slot.getValue(exec, propertyName); 223 if (!exec->hadException()) 224 descriptor.setValue(value); 225 // We don't know whether the property is configurable, but assume it is. 226 descriptor.setConfigurable(true); 227 // We don't know whether the property is enumerable (we could call getOwnPropertyNames() to find out), but assume it isn't. 228 descriptor.setEnumerable(false); 229 return true; 230 } 231 232 return Parent::getOwnPropertyDescriptor(thisObject, exec, propertyName, descriptor); 233 } 216 GET_OWN_PROPERTY_DESCRIPTOR_IMPL(JSCallbackObject<Parent>) 234 217 235 218 template <class Parent>
Note:
See TracChangeset
for help on using the changeset viewer.