| Index: Source/heap/Handle.h
|
| diff --git a/Source/heap/Handle.h b/Source/heap/Handle.h
|
| index 20c629c0c16beea7e2a0ed4c51547584b94d5615..d4a488795899e52fa9931bc08188195a6a28444e 100644
|
| --- a/Source/heap/Handle.h
|
| +++ b/Source/heap/Handle.h
|
| @@ -35,6 +35,7 @@
|
| #include "heap/ThreadState.h"
|
| #include "heap/Visitor.h"
|
|
|
| +#include "wtf/HashFunctions.h"
|
| #include "wtf/Locker.h"
|
| #include "wtf/RawPtr.h"
|
| #include "wtf/RefCounted.h"
|
| @@ -872,6 +873,15 @@ template<typename T> struct PtrHash<WebCore::Member<T> > : PtrHash<T*> {
|
| template<typename T> struct PtrHash<WebCore::WeakMember<T> > : PtrHash<WebCore::Member<T> > {
|
| };
|
|
|
| +template<typename P> struct PtrHash<WebCore::Persistent<P> > : PtrHash<P*> {
|
| + using PtrHash<P*>::hash;
|
| + static unsigned hash(const RefPtr<P>& key) { return hash(key.get()); }
|
| + using PtrHash<P*>::equal;
|
| + static bool equal(const RefPtr<P>& a, const RefPtr<P>& b) { return a == b; }
|
| + static bool equal(P* a, const RefPtr<P>& b) { return a == b; }
|
| + static bool equal(const RefPtr<P>& a, P* b) { return a == b; }
|
| +};
|
| +
|
| // PtrHash is the default hash for hash tables with members.
|
| template<typename T> struct DefaultHash<WebCore::Member<T> > {
|
| typedef PtrHash<WebCore::Member<T> > Hash;
|
| @@ -881,6 +891,10 @@ template<typename T> struct DefaultHash<WebCore::WeakMember<T> > {
|
| typedef PtrHash<WebCore::WeakMember<T> > Hash;
|
| };
|
|
|
| +template<typename T> struct DefaultHash<WebCore::Persistent<T> > {
|
| + typedef PtrHash<WebCore::Persistent<T> > Hash;
|
| +};
|
| +
|
| template<typename T>
|
| struct NeedsTracing<WebCore::Member<T> > {
|
| static const bool value = true;
|
|
|