#include <runtime/JSObject.h>
#include <runtime/Protect.h>
#include <runtime/UString.h>
+#include <runtime/WeakGCPtr.h>
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
-struct StaticValueEntry {
+struct StaticValueEntry : FastAllocBase {
StaticValueEntry(JSObjectGetPropertyCallback _getProperty, JSObjectSetPropertyCallback _setProperty, JSPropertyAttributes _attributes)
: getProperty(_getProperty), setProperty(_setProperty), attributes(_attributes)
{
JSPropertyAttributes attributes;
};
-struct StaticFunctionEntry {
+struct StaticFunctionEntry : FastAllocBase {
StaticFunctionEntry(JSObjectCallAsFunctionCallback _callAsFunction, JSPropertyAttributes _attributes)
: callAsFunction(_callAsFunction), attributes(_attributes)
{
typedef HashMap<RefPtr<JSC::UString::Rep>, StaticValueEntry*> OpaqueJSClassStaticValuesTable;
typedef HashMap<RefPtr<JSC::UString::Rep>, StaticFunctionEntry*> OpaqueJSClassStaticFunctionsTable;
-class OpaqueJSClass;
+struct OpaqueJSClass;
// An OpaqueJSClass (JSClass) is created without a context, so it can be used with any context, even across context groups.
// This structure holds data members that vary across context groups.
OpaqueJSClassStaticValuesTable* staticValues;
OpaqueJSClassStaticFunctionsTable* staticFunctions;
- JSC::JSObject* cachedPrototype;
+ JSC::WeakGCPtr<JSC::JSObject> cachedPrototype;
};
struct OpaqueJSClass : public ThreadSafeShared<OpaqueJSClass> {