Changeset 33979 in webkit for trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
- Timestamp:
- May 21, 2008, 6:20:45 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r33038 r33979 238 238 239 239 template <class Base> 240 bool JSCallbackObject<Base>::implementsConstruct() const 240 ConstructType JSCallbackObject<Base>::getConstructData(ConstructData&) 241 241 { 242 242 for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) 243 243 if (jsClass->callAsConstructor) 244 return true;245 246 return false;244 return ConstructTypeNative; 245 246 return ConstructTypeNone; 247 247 } 248 248 … … 264 264 } 265 265 266 ASSERT(0); // implementsConstructshould prevent us from reaching here266 ASSERT(0); // getConstructData should prevent us from reaching here 267 267 return 0; 268 268 } … … 294 294 } 295 295 296 297 template <class Base> 298 bool JSCallbackObject<Base>::implementsCall() const 296 template <class Base> 297 CallType JSCallbackObject<Base>::getCallData(CallData&) 299 298 { 300 299 for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) 301 300 if (jsClass->callAsFunction) 302 return true;303 304 return false;301 return CallTypeNative; 302 303 return CallTypeNone; 305 304 } 306 305 … … 323 322 } 324 323 325 ASSERT_NOT_REACHED(); // implementsCallshould prevent us from reaching here324 ASSERT_NOT_REACHED(); // getCallData should prevent us from reaching here 326 325 return 0; 327 326 } … … 368 367 double JSCallbackObject<Base>::toNumber(ExecState* exec) const 369 368 { 369 // We need this check to guard against the case where this object is rhs of 370 // a binary expression where lhs threw an exception in its conversion to 371 // primitive 372 if (exec->hadException()) 373 return NaN; 370 374 JSContextRef ctx = toRef(exec); 371 375 JSObjectRef thisRef = toRef(this);
Note:
See TracChangeset
for help on using the changeset viewer.