Index: Source/wtf/HashTraits.h |
diff --git a/Source/wtf/HashTraits.h b/Source/wtf/HashTraits.h |
index 69df8b781a1447b8f1951c7f955e5c0490768d9d..fe4c12f60e6058309c83bbf58c357f92d939ee9c 100644 |
--- a/Source/wtf/HashTraits.h |
+++ b/Source/wtf/HashTraits.h |
@@ -138,17 +138,15 @@ namespace WTF { |
}; |
template<typename P> struct HashTraits<RefPtr<P> > : SimpleClassHashTraits<RefPtr<P> > { |
- static RefPtr<P>& emptyValue() |
- { |
- static RefPtr<P>& null = *(new RefPtr<P>); |
- return null; |
- } |
+ static P* emptyValue() { return 0; } |
typedef PassRefPtr<P> PassInType; |
static void store(PassRefPtr<P> value, RefPtr<P>& storage) { storage = value; } |
typedef PassRefPtr<P> PassOutType; |
static PassRefPtr<P> passOut(RefPtr<P>& value) { return value.release(); } |
+ static PassRefPtr<P> passOut(P* value) { return value; } |
eseidel
2013/05/06 18:38:59
What does this do? Is it safe?
|
+ |
// FIXME: We should consider changing PeekType to a raw pointer for better performance, |
// but then callers won't need to call get; doing so will require updating many call sites. |
}; |