ErrorConstructor.h [plain text]
#ifndef ErrorConstructor_h
#define ErrorConstructor_h
#include "ErrorInstance.h"
#include "InternalFunction.h"
namespace JSC {
class ErrorPrototype;
class ErrorConstructor : public InternalFunction {
public:
typedef InternalFunction Base;
static ErrorConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ErrorPrototype* errorPrototype)
{
ErrorConstructor* constructor = new (NotNull, allocateCell<ErrorConstructor>(*exec->heap())) ErrorConstructor(globalObject, structure);
constructor->finishCreation(exec, errorPrototype);
return constructor;
}
static const ClassInfo s_info;
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
}
protected:
void finishCreation(ExecState*, ErrorPrototype*);
private:
ErrorConstructor(JSGlobalObject*, Structure*);
static ConstructType getConstructData(JSCell*, ConstructData&);
static CallType getCallData(JSCell*, CallData&);
};
}
#endif // ErrorConstructor_h