namespace JSC {
class JSCallbackFunction : public InternalFunction {
+ friend struct APICallbackFunction;
public:
- JSCallbackFunction(ExecState*, JSObjectCallAsFunctionCallback, const Identifier& name);
+ typedef InternalFunction Base;
- static const ClassInfo info;
+ static JSCallbackFunction* create(ExecState*, JSGlobalObject*, JSObjectCallAsFunctionCallback, const String& name);
+
+ static const ClassInfo s_info;
// InternalFunction mish-mashes constructor and function behavior -- we should
// refactor the code so this override isn't necessary
- static PassRefPtr<Structure> createStructure(JSValuePtr proto)
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot));
+ return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info);
}
private:
- virtual CallType getCallData(CallData&);
- virtual const ClassInfo* classInfo() const { return &info; }
+ JSCallbackFunction(JSGlobalObject*, Structure*, JSObjectCallAsFunctionCallback);
+ void finishCreation(VM&, const String& name);
+
+ static CallType getCallData(JSCell*, CallData&);
- static JSValuePtr call(ExecState*, JSObject*, JSValuePtr, const ArgList&);
+ JSObjectCallAsFunctionCallback functionCallback() { return m_callback; }
JSObjectCallAsFunctionCallback m_callback;
};