X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..f9bf01c6616d5ddcf65b13b33cedf9e387ff7a63:/API/JSClassRef.h?ds=inline diff --git a/API/JSClassRef.h b/API/JSClassRef.h index 4f67618..ae60aad 100644 --- a/API/JSClassRef.h +++ b/API/JSClassRef.h @@ -31,10 +31,11 @@ #include #include #include +#include #include #include -struct StaticValueEntry { +struct StaticValueEntry : FastAllocBase { StaticValueEntry(JSObjectGetPropertyCallback _getProperty, JSObjectSetPropertyCallback _setProperty, JSPropertyAttributes _attributes) : getProperty(_getProperty), setProperty(_setProperty), attributes(_attributes) { @@ -45,7 +46,7 @@ struct StaticValueEntry { JSPropertyAttributes attributes; }; -struct StaticFunctionEntry { +struct StaticFunctionEntry : FastAllocBase { StaticFunctionEntry(JSObjectCallAsFunctionCallback _callAsFunction, JSPropertyAttributes _attributes) : callAsFunction(_callAsFunction), attributes(_attributes) { @@ -58,7 +59,7 @@ struct StaticFunctionEntry { typedef HashMap, StaticValueEntry*> OpaqueJSClassStaticValuesTable; typedef HashMap, 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. @@ -76,7 +77,7 @@ struct OpaqueJSClassContextData : Noncopyable { OpaqueJSClassStaticValuesTable* staticValues; OpaqueJSClassStaticFunctionsTable* staticFunctions; - JSC::JSObject* cachedPrototype; + JSC::WeakGCPtr cachedPrototype; }; struct OpaqueJSClass : public ThreadSafeShared {