Title: [163461] releases/WebKitGTK/webkit-2.4/Source/WTF
Revision
163461
Author
[email protected]
Date
2014-02-05 11:26:55 -0800 (Wed, 05 Feb 2014)

Log Message

Merge r163460 - 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: releases/WebKitGTK/webkit-2.4/Source/WTF/ChangeLog (163460 => 163461)


--- releases/WebKitGTK/webkit-2.4/Source/WTF/ChangeLog	2014-02-05 19:13:57 UTC (rev 163460)
+++ releases/WebKitGTK/webkit-2.4/Source/WTF/ChangeLog	2014-02-05 19:26:55 UTC (rev 163461)
@@ -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-01-29  Csaba Osztrogonác  <[email protected]>
 
         Remove ENABLE(_javascript__DEBUGGER) guards

Modified: releases/WebKitGTK/webkit-2.4/Source/WTF/wtf/HashTraits.h (163460 => 163461)


--- releases/WebKitGTK/webkit-2.4/Source/WTF/wtf/HashTraits.h	2014-02-05 19:13:57 UTC (rev 163460)
+++ releases/WebKitGTK/webkit-2.4/Source/WTF/wtf/HashTraits.h	2014-02-05 19:26:55 UTC (rev 163461)
@@ -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

Reply via email to