| Index: Source/heap/Handle.h
|
| diff --git a/Source/heap/Handle.h b/Source/heap/Handle.h
|
| index 63e44b360a5ebbf04442ff999e426fae246870e7..d8d0f5fae4377f30cb45e0a54212a96ad4104855 100644
|
| --- a/Source/heap/Handle.h
|
| +++ b/Source/heap/Handle.h
|
| @@ -40,6 +40,12 @@
|
| #include <wtf/TypeTraits.h>
|
| #include <wtf/Vector.h>
|
|
|
| +namespace WTF {
|
| +
|
| +template<typename A, typename B, typename C, typename D, typename E, typename F, typename G> class HashTableConstIterator;
|
| +
|
| +}
|
| +
|
| namespace WebCore {
|
|
|
| // Forward declarations.
|
| @@ -759,6 +765,22 @@ public:
|
| Handle<T> handle() const { return Handle<T>(releaseRaw()); }
|
|
|
| private:
|
| + template<typename U>
|
| + Result(const Member<U>* other)
|
| + : m_raw(other->raw())
|
| +#ifndef NDEBUG
|
| + , m_doNotAllocate()
|
| +#endif
|
| + {
|
| + }
|
| +
|
| + template<typename U>
|
| + Result& operator=(const Member<U>* other)
|
| + {
|
| + COMPILE_ASSERT(!sizeof(T*), Result_should_never_be_assigned_to);
|
| + return *this;
|
| + }
|
| +
|
| explicit Result(T* raw)
|
| : m_raw(raw)
|
| #ifndef NDEBUG
|
| @@ -785,6 +807,7 @@ private:
|
| mutable NoAllocation m_doNotAllocate;
|
| #endif
|
|
|
| + template<typename U> friend void Visitor::visit(const class Result<U>&);
|
| template<typename U> friend class Persistent;
|
| template<typename U> friend class Handle;
|
| template<typename U> friend class Member;
|
| @@ -810,6 +833,7 @@ private:
|
| template<typename U, typename V> friend bool operator!=(const Result<U>&, const V*);
|
| template<typename U, typename V> friend bool operator==(const U*, const Result<V>&);
|
| template<typename U, typename V> friend bool operator!=(const U*, const Result<V>&);
|
| + template<typename A, typename B, typename C, typename D, typename E, typename F, typename G> friend class WTF::HashTableConstIterator;
|
| };
|
|
|
| template<class T>
|
| @@ -1353,6 +1377,12 @@ template<typename T> struct HashTraits<WebCore::Member<T> > : SimpleClassHashTra
|
| // the two types can be merged into PassInType.
|
| typedef const typename WebCore::Handle<T>& PeekInType;
|
| typedef const typename WebCore::Handle<T>& PassInType;
|
| + typedef WebCore::Result<T> IteratorGetType;
|
| + typedef WebCore::Result<T> IteratorConstGetType;
|
| + typedef WebCore::Result<T> IteratorReferenceType;
|
| + typedef WebCore::Result<T> IteratorConstReferenceType;
|
| + static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { return x; }
|
| + static IteratorConstReferenceType getToReferenceConstConversion(IteratorConstGetType x) { return x; }
|
| // FIXME(oilpan): Similarly, there is no need for a distinction between
|
| // PeekType and PassOutType without reference counting.
|
| typedef typename WebCore::Result<T> PeekType;
|
|
|