Ignore:
Timestamp:
May 21, 2008, 6:20:45 PM (17 years ago)
Author:
[email protected]
Message:

Merge squirrelfish branch into trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r33038 r33979  
    238238
    239239template <class Base>
    240 bool JSCallbackObject<Base>::implementsConstruct() const
     240ConstructType JSCallbackObject<Base>::getConstructData(ConstructData&)
    241241{
    242242    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass)
    243243        if (jsClass->callAsConstructor)
    244             return true;
    245    
    246     return false;
     244            return ConstructTypeNative;
     245   
     246    return ConstructTypeNone;
    247247}
    248248
     
    264264    }
    265265   
    266     ASSERT(0); // implementsConstruct should prevent us from reaching here
     266    ASSERT(0); // getConstructData should prevent us from reaching here
    267267    return 0;
    268268}
     
    294294}
    295295
    296 
    297 template <class Base>
    298 bool JSCallbackObject<Base>::implementsCall() const
     296template <class Base>
     297CallType JSCallbackObject<Base>::getCallData(CallData&)
    299298{
    300299    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass)
    301300        if (jsClass->callAsFunction)
    302             return true;
    303    
    304     return false;
     301            return CallTypeNative;
     302   
     303    return CallTypeNone;
    305304}
    306305
     
    323322    }
    324323   
    325     ASSERT_NOT_REACHED(); // implementsCall should prevent us from reaching here
     324    ASSERT_NOT_REACHED(); // getCallData should prevent us from reaching here
    326325    return 0;
    327326}
     
    368367double JSCallbackObject<Base>::toNumber(ExecState* exec) const
    369368{
     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;
    370374    JSContextRef ctx = toRef(exec);
    371375    JSObjectRef thisRef = toRef(this);
Note: See TracChangeset for help on using the changeset viewer.