diff options
Diffstat (limited to 'Source/WebCore/bindings/js/ScriptWrappable.h')
-rw-r--r-- | Source/WebCore/bindings/js/ScriptWrappable.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/WebCore/bindings/js/ScriptWrappable.h b/Source/WebCore/bindings/js/ScriptWrappable.h index 0fbe9e4..4fef506 100644 --- a/Source/WebCore/bindings/js/ScriptWrappable.h +++ b/Source/WebCore/bindings/js/ScriptWrappable.h @@ -32,28 +32,29 @@ #define ScriptWrappable_h #include "JSDOMWrapper.h" -#include <runtime/WeakGCPtr.h> +#include <heap/Weak.h> namespace WebCore { class ScriptWrappable { public: - ScriptWrappable() + JSDOMWrapper* wrapper() const { + return m_wrapper.get(); } - DOMObject* wrapper() const + void setWrapper(JSC::JSGlobalData& globalData, JSDOMWrapper* wrapper, JSC::WeakHandleOwner* wrapperOwner, void* context) { - return m_wrapper.get(); + m_wrapper.set(globalData, wrapper, wrapperOwner, context); } - void setWrapper(JSC::JSGlobalData& globalData, DOMObject* wrapper) + void clearWrapper() { - m_wrapper.set(globalData, wrapper, 0); + m_wrapper.clear(); } private: - JSC::WeakGCPtr<DOMObject> m_wrapper; + JSC::Weak<JSDOMWrapper> m_wrapper; }; } // namespace WebCore |