Title: [163460] trunk/Source/WTF
- Revision
- 163460
- Author
- [email protected]
- Date
- 2014-02-05 11:13:57 -0800 (Wed, 05 Feb 2014)
Log Message
HashMap can't be used with std::unique_ptr as value when it has a custom deleter
https://bugs.webkit.org/show_bug.cgi?id=128250
Patch by Carlos Garcia Campos <[email protected]> on 2014-02-05
Reviewed by Darin Adler.
The problem is that the HashMap is using a unique_ptr with the
default deleter, so that when trying to move the unique_ptr the
deleters don't match.
* wtf/HashTraits.h: Add the deleter also in the template
definitation of the parent class for the HashTraits<std::unique_ptr<T, Deleter>>
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (163459 => 163460)
--- trunk/Source/WTF/ChangeLog 2014-02-05 18:51:22 UTC (rev 163459)
+++ trunk/Source/WTF/ChangeLog 2014-02-05 19:13:57 UTC (rev 163460)
@@ -1,3 +1,17 @@
+2014-02-05 Carlos Garcia Campos <[email protected]>
+
+ HashMap can't be used with std::unique_ptr as value when it has a custom deleter
+ https://bugs.webkit.org/show_bug.cgi?id=128250
+
+ Reviewed by Darin Adler.
+
+ The problem is that the HashMap is using a unique_ptr with the
+ default deleter, so that when trying to move the unique_ptr the
+ deleters don't match.
+
+ * wtf/HashTraits.h: Add the deleter also in the template
+ definitation of the parent class for the HashTraits<std::unique_ptr<T, Deleter>>
+
2014-02-05 Csaba Osztrogonác <[email protected]>
Remove ENABLE(SVG) guards
Modified: trunk/Source/WTF/wtf/HashTraits.h (163459 => 163460)
--- trunk/Source/WTF/wtf/HashTraits.h 2014-02-05 18:51:22 UTC (rev 163459)
+++ trunk/Source/WTF/wtf/HashTraits.h 2014-02-05 19:13:57 UTC (rev 163460)
@@ -101,7 +101,7 @@
static bool isDeletedValue(const T& value) { return value.isHashTableDeletedValue(); }
};
-template<typename T, typename Deleter> struct HashTraits<std::unique_ptr<T, Deleter>> : SimpleClassHashTraits<std::unique_ptr<T>> {
+template<typename T, typename Deleter> struct HashTraits<std::unique_ptr<T, Deleter>> : SimpleClassHashTraits<std::unique_ptr<T, Deleter>> {
typedef std::nullptr_t EmptyValueType;
static EmptyValueType emptyValue() { return nullptr; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes