Title: [149770] trunk/Source/WTF
- Revision
- 149770
- Author
- [email protected]
- Date
- 2013-05-08 15:08:33 -0700 (Wed, 08 May 2013)
Log Message
Simplify RetainPtrObjectHashTraits
https://bugs.webkit.org/show_bug.cgi?id=115822
Reviewed by Benjamin Poulain.
RetainPtrObjectHashTraits is inherited from SimpleClassHashTraits
instead of GenericHashTraits re-using more shared functionality.
* wtf/RetainPtr.h:
(WTF::RetainPtrObjectHashTraits::emptyValue):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (149769 => 149770)
--- trunk/Source/WTF/ChangeLog 2013-05-08 22:05:26 UTC (rev 149769)
+++ trunk/Source/WTF/ChangeLog 2013-05-08 22:08:33 UTC (rev 149770)
@@ -1,3 +1,16 @@
+2013-05-08 Mikhail Pozdnyakov <[email protected]>
+
+ Simplify RetainPtrObjectHashTraits
+ https://bugs.webkit.org/show_bug.cgi?id=115822
+
+ Reviewed by Benjamin Poulain.
+
+ RetainPtrObjectHashTraits is inherited from SimpleClassHashTraits
+ instead of GenericHashTraits re-using more shared functionality.
+
+ * wtf/RetainPtr.h:
+ (WTF::RetainPtrObjectHashTraits::emptyValue):
+
2013-05-08 Anders Carlsson <[email protected]>
Assert at compile time that we don't pass Objective-C object pointers to adoptCF
Modified: trunk/Source/WTF/wtf/RetainPtr.h (149769 => 149770)
--- trunk/Source/WTF/wtf/RetainPtr.h 2013-05-08 22:05:26 UTC (rev 149769)
+++ trunk/Source/WTF/wtf/RetainPtr.h 2013-05-08 22:08:33 UTC (rev 149770)
@@ -301,16 +301,12 @@
template<typename P> struct DefaultHash<RetainPtr<P> > { typedef PtrHash<RetainPtr<P> > Hash; };
template <typename P>
- struct RetainPtrObjectHashTraits : GenericHashTraits<RetainPtr<P> > {
- static const bool emptyValueIsZero = true;
+ struct RetainPtrObjectHashTraits : SimpleClassHashTraits<RetainPtr<P> > {
static const RetainPtr<P>& emptyValue()
{
static RetainPtr<P>& null = *(new RetainPtr<P>);
return null;
}
- static const bool needsDestruction = true;
- static void constructDeletedValue(RetainPtr<P>& slot) { new (&slot) RetainPtr<P>(HashTableDeletedValue); }
- static bool isDeletedValue(const RetainPtr<P>& value) { return value.isHashTableDeletedValue(); }
};
template <typename P>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes