Changeset 53638 in webkit for trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
- Timestamp:
- Jan 21, 2010, 12:46:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r53170 r53638 169 169 170 170 template <class Base> 171 bool JSCallbackObject<Base>::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) 172 { 173 PropertySlot slot; 174 if (getOwnPropertySlot(exec, propertyName, slot)) { 175 // Ideally we should return an access descriptor, but returning a value descriptor is better than nothing. 176 JSValue value = slot.getValue(exec, propertyName); 177 if (!exec->hadException()) 178 descriptor.setValue(value); 179 // We don't know whether the property is configurable, but assume it is. 180 descriptor.setConfigurable(true); 181 // We don't know whether the property is enumerable (we could call getOwnPropertyNames() to find out), but assume it isn't. 182 descriptor.setEnumerable(false); 183 return true; 184 } 185 186 return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor); 187 } 188 189 template <class Base> 171 190 void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 172 191 {
Note:
See TracChangeset
for help on using the changeset viewer.