Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2241)

Unified Diff: Source/heap/Handle.h

Issue 183833009: Oilpan: Allowing hashing of RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/heap/HeapTest.cpp » ('j') | Source/wtf/HashTraits.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/heap/Handle.h
diff --git a/Source/heap/Handle.h b/Source/heap/Handle.h
index e90b7c882c76a7cd4774fe8adc84b4c813289767..d4ef8f136401f67d5e8737fc7e0ea2fa51491f74 100644
--- a/Source/heap/Handle.h
+++ b/Source/heap/Handle.h
@@ -727,10 +727,9 @@ template<typename T> struct HashTraits<WebCore::Member<T> > : SimpleClassHashTra
typedef RawPtr<T> PassInType;
typedef WebCore::Member<T>* IteratorGetType;
typedef const WebCore::Member<T>* IteratorConstGetType;
- typedef T* IteratorReferenceType;
- typedef T* IteratorConstReferenceType;
- static IteratorConstGetType getToConstGetConversion(const WebCore::Member<T>* x) { return x->get(); }
- static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { return x->get(); }
+ typedef WebCore::Member<T>& IteratorReferenceType;
+ typedef T* const IteratorConstReferenceType;
+ static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { return *x; }
static IteratorConstReferenceType getToReferenceConstConversion(IteratorConstGetType x) { return x->get(); }
// FIXME: Similarly, there is no need for a distinction between PeekOutType
// and PassOutType without reference counting.
@@ -755,10 +754,9 @@ template<typename T> struct HashTraits<WebCore::WeakMember<T> > : SimpleClassHas
typedef RawPtr<T> PassInType;
typedef WebCore::WeakMember<T>* IteratorGetType;
typedef const WebCore::WeakMember<T>* IteratorConstGetType;
- typedef T* IteratorReferenceType;
- typedef T* IteratorConstReferenceType;
- static IteratorConstGetType getToConstGetConversion(const WebCore::WeakMember<T>* x) { return x->get(); }
- static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { return x->get(); }
+ typedef WebCore::WeakMember<T>& IteratorReferenceType;
+ typedef T* const IteratorConstReferenceType;
+ static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { return *x; }
static IteratorConstReferenceType getToReferenceConstConversion(IteratorConstGetType x) { return x->get(); }
// FIXME: Similarly, there is no need for a distinction between PeekOutType
// and PassOutType without reference counting.
« no previous file with comments | « no previous file | Source/heap/HeapTest.cpp » ('j') | Source/wtf/HashTraits.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698