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

Unified Diff: Source/wtf/RefPtr.h

Issue 184233006: Remove RefPtrHashMap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 | « Source/wtf/HashTraits.h ('k') | Source/wtf/RefPtrHashMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/RefPtr.h
diff --git a/Source/wtf/RefPtr.h b/Source/wtf/RefPtr.h
index 22307b7033c03fc7d4f29a5dcb3e27669cc77bce..b431d7d23461f475970ea354e454a8bc0d048ece 100644
--- a/Source/wtf/RefPtr.h
+++ b/Source/wtf/RefPtr.h
@@ -188,6 +188,16 @@ namespace WTF {
return p.get();
}
+ template<typename T> class RefPtrValuePeeker {
+ public:
+ ALWAYS_INLINE RefPtrValuePeeker(T* p): m_ptr(p) { }
+ template<typename U> RefPtrValuePeeker(const RefPtr<U>& p): m_ptr(p.get()) { }
+ template<typename U> RefPtrValuePeeker(const PassRefPtr<U>& p): m_ptr(p.get()) { }
+ ALWAYS_INLINE operator T*() const { return m_ptr; }
+ private:
+ T* m_ptr;
+ };
+
} // namespace WTF
using WTF::RefPtr;
« no previous file with comments | « Source/wtf/HashTraits.h ('k') | Source/wtf/RefPtrHashMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698