Changeset 15443 in webkit for trunk/JavaScriptCore/API/JSCallbackObject.cpp
- Timestamp:
- Jul 14, 2006, 9:10:31 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackObject.cpp
r15400 r15443 90 90 // optional optimization to bypass getProperty in cases when we only need to know if the property exists 91 91 if (JSObjectHasPropertyCallback hasProperty = jsClass->callbacks.hasProperty) { 92 if (hasProperty(context, thisRef, propertyNameRef , toRef(exec->exceptionSlot()))) {92 if (hasProperty(context, thisRef, propertyNameRef)) { 93 93 slot.setCustom(this, callbackGetter); 94 94 return true; … … 322 322 } 323 323 324 bool JSCallbackObject::toBoolean(ExecState* exec) const325 {326 JSContextRef context = toRef(exec);327 JSObjectRef thisRef = toRef(this);328 329 for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parent)330 if (JSObjectConvertToTypeCallback convertToType = jsClass->callbacks.convertToType)331 if (JSValueRef value = convertToType(context, thisRef, kJSTypeBoolean, toRef(exec->exceptionSlot())))332 return toJS(value)->getBoolean();333 334 return JSObject::toBoolean(exec);335 }336 337 324 double JSCallbackObject::toNumber(ExecState* exec) const 338 325 {
Note:
See TracChangeset
for help on using the changeset viewer.