JSPromisePrototype.cpp [plain text]
#include "config.h"
#include "JSPromisePrototype.h"
#if ENABLE(PROMISES)
#include "Error.h"
#include "JSCBuiltins.h"
#include "JSCJSValueInlines.h"
#include "JSCellInlines.h"
#include "JSGlobalObject.h"
#include "JSPromise.h"
#include "Microtask.h"
#include "StructureInlines.h"
namespace JSC {
STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSPromisePrototype);
}
#include "JSPromisePrototype.lut.h"
namespace JSC {
const ClassInfo JSPromisePrototype::s_info = { "PromisePrototype", &JSNonFinalObject::s_info, &promisePrototypeTable, CREATE_METHOD_TABLE(JSPromisePrototype) };
JSPromisePrototype* JSPromisePrototype::create(ExecState* exec, JSGlobalObject*, Structure* structure)
{
VM& vm = exec->vm();
JSPromisePrototype* object = new (NotNull, allocateCell<JSPromisePrototype>(vm.heap)) JSPromisePrototype(exec, structure);
object->finishCreation(vm, structure);
return object;
}
Structure* JSPromisePrototype::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
}
JSPromisePrototype::JSPromisePrototype(ExecState* exec, Structure* structure)
: JSNonFinalObject(exec->vm(), structure)
{
}
void JSPromisePrototype::finishCreation(VM& vm, Structure*)
{
Base::finishCreation(vm);
}
bool JSPromisePrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
return getStaticFunctionSlot<JSObject>(exec, promisePrototypeTable, jsCast<JSPromisePrototype*>(object), propertyName, slot);
}
}
#endif // ENABLE(PROMISES)