X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..HEAD:/jit/JITThunks.h diff --git a/jit/JITThunks.h b/jit/JITThunks.h index 9e28ecb..64a06b5 100644 --- a/jit/JITThunks.h +++ b/jit/JITThunks.h @@ -34,9 +34,9 @@ #include "MacroAssemblerCodeRef.h" #include "ThunkGenerator.h" #include "Weak.h" +#include "WeakHandleOwner.h" #include "WeakInlines.h" #include -#include #include #include @@ -45,10 +45,11 @@ namespace JSC { class VM; class NativeExecutable; -class JITThunks { +class JITThunks final : private WeakHandleOwner { + WTF_MAKE_FAST_ALLOCATED; public: JITThunks(); - ~JITThunks(); + virtual ~JITThunks(); MacroAssemblerCodePtr ctiNativeCall(VM*); MacroAssemblerCodePtr ctiNativeConstruct(VM*); @@ -65,11 +66,13 @@ private: // Main thread can hold this lock for a while, so use an adaptive mutex. typedef Mutex Lock; typedef MutexLocker Locker; + + void finalize(Handle, void* context) override; typedef HashMap CTIStubMap; CTIStubMap m_ctiStubMap; typedef HashMap, Weak> HostFunctionStubMap; - OwnPtr m_hostFunctionStubMap; + std::unique_ptr m_hostFunctionStubMap; Lock m_lock; };