namespace JSC {
-class JSGlobalData;
+class VM;
// A strongly referenced handle that prevents the object it points to from being garbage collected.
template <typename T> class Strong : public Handle<T> {
using Handle<T>::slot;
using Handle<T>::setSlot;
+ template <typename U> friend class Strong;
public:
typedef typename Handle<T>::ExternalType ExternalType;
{
}
- Strong(JSGlobalData&, ExternalType = ExternalType());
+ Strong(VM&, ExternalType = ExternalType());
- Strong(JSGlobalData&, Handle<T>);
+ Strong(VM&, Handle<T>);
Strong(const Strong& other)
: Handle<T>()
ExternalType get() const { return HandleTypes<T>::getFromSlot(this->slot()); }
- void set(JSGlobalData&, ExternalType);
+ void set(VM&, ExternalType);
template <typename U> Strong& operator=(const Strong<U>& other)
{
return *this;
}
- set(*HandleSet::heapFor(other.slot())->globalData(), other.get());
+ set(*HandleSet::heapFor(other.slot())->vm(), other.get());
return *this;
}
return *this;
}
- set(*HandleSet::heapFor(other.slot())->globalData(), other.get());
+ set(*HandleSet::heapFor(other.slot())->vm(), other.get());
return *this;
}
namespace WTF {
-template<typename T> struct VectorTraits<JSC::Strong<T> > : SimpleClassVectorTraits {
+template<typename T> struct VectorTraits<JSC::Strong<T>> : SimpleClassVectorTraits {
static const bool canCompareWithMemcmp = false;
};
-template<typename P> struct HashTraits<JSC::Strong<P> > : SimpleClassHashTraits<JSC::Strong<P> > { };
+template<typename P> struct HashTraits<JSC::Strong<P>> : SimpleClassHashTraits<JSC::Strong<P>> { };
}