Title: [149739] trunk/Source/WTF
- Revision
- 149739
- Author
- [email protected]
- Date
- 2013-05-08 08:08:55 -0700 (Wed, 08 May 2013)
Log Message
HashTraits<RefPtr<P> >::peek should consider empty value
https://bugs.webkit.org/show_bug.cgi?id=115799
Reviewed by Darin Adler.
HashTraits<RefPtr<P> >::peek() should consider passing of empty value which is
raw pointer equal to '0', and return it right away instead of converting it to RefPtr
and invoking get().
* wtf/HashTraits.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (149738 => 149739)
--- trunk/Source/WTF/ChangeLog 2013-05-08 15:07:56 UTC (rev 149738)
+++ trunk/Source/WTF/ChangeLog 2013-05-08 15:08:55 UTC (rev 149739)
@@ -1,5 +1,18 @@
2013-05-08 Mikhail Pozdnyakov <[email protected]>
+ HashTraits<RefPtr<P> >::peek should consider empty value
+ https://bugs.webkit.org/show_bug.cgi?id=115799
+
+ Reviewed by Darin Adler.
+
+ HashTraits<RefPtr<P> >::peek() should consider passing of empty value which is
+ raw pointer equal to '0', and return it right away instead of converting it to RefPtr
+ and invoking get().
+
+ * wtf/HashTraits.h:
+
+2013-05-08 Mikhail Pozdnyakov <[email protected]>
+
Avoid unnecessary arguments copying inside GenericHashTraits methods
https://bugs.webkit.org/show_bug.cgi?id=115733
Modified: trunk/Source/WTF/wtf/HashTraits.h (149738 => 149739)
--- trunk/Source/WTF/wtf/HashTraits.h 2013-05-08 15:07:56 UTC (rev 149738)
+++ trunk/Source/WTF/wtf/HashTraits.h 2013-05-08 15:08:55 UTC (rev 149739)
@@ -151,6 +151,7 @@
typedef P* PeekType;
static PeekType peek(const RefPtr<P>& value) { return value.get(); }
+ static PeekType peek(P* value) { return value; }
};
template<> struct HashTraits<String> : SimpleClassHashTraits<String> {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes