JSDOMWindowProperties.h [plain text]
#pragma once
#include "JSDOMWindow.h"
#include "JSDOMWrapper.h"
namespace WebCore {
class JSDOMWindowProperties final : public JSDOMObject {
public:
using Base = JSDOMObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::IsImmutablePrototypeExoticObject;
static constexpr bool needsDestruction = false;
template<typename CellType, JSC::SubspaceAccess>
static JSC::IsoSubspace* subspaceFor(JSC::VM& vm)
{
static_assert(CellType::destroy == JSC::JSCell::destroy, "JSDOMWindowProperties is not destructible actually");
return subspaceForImpl(vm);
}
static JSDOMWindowProperties* create(JSC::Structure* structure, JSC::JSGlobalObject& globalObject)
{
JSDOMWindowProperties* ptr = new (NotNull, JSC::allocateCell<JSDOMWindowProperties>(globalObject.vm().heap)) JSDOMWindowProperties(structure, globalObject);
ptr->finishCreation(globalObject.vm());
return ptr;
}
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info(), JSC::MayHaveIndexedAccessors);
}
static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&);
private:
JSDOMWindowProperties(JSC::Structure* structure, JSC::JSGlobalObject& globalObject)
: JSDOMObject(structure, globalObject)
{
}
void finishCreation(JSC::VM&);
static JSC::IsoSubspace* subspaceForImpl(JSC::VM&);
};
}