Title: [227802] branches/safari-605-branch/Source/WTF
Revision
227802
Author
[email protected]
Date
2018-01-30 10:49:57 -0800 (Tue, 30 Jan 2018)

Log Message

Cherry-pick r227628. rdar://problem/37019369

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WTF/ChangeLog (227801 => 227802)


--- branches/safari-605-branch/Source/WTF/ChangeLog	2018-01-30 18:49:52 UTC (rev 227801)
+++ branches/safari-605-branch/Source/WTF/ChangeLog	2018-01-30 18:49:57 UTC (rev 227802)
@@ -1,3 +1,22 @@
+2018-01-30  Jason Marcell  <[email protected]>
+
+        Cherry-pick r227628. rdar://problem/37019369
+
+    2018-01-25  Mark Lam  <[email protected]>
+
+            Rename the Poisoned::isPoisoned constant to Poisoned::isPoisonedType.
+            https://bugs.webkit.org/show_bug.cgi?id=182143
+            <rdar://problem/36880970>
+
+            Reviewed by JF Bastien.
+
+            This is so that it doesn't conflict with the isPoisoned() debugging methods that
+            are normally not built.  Also renamed PoisonedUniquePtr::isPoisonedUniquePtr to
+            PoisonedUniquePtr::isPoisonedUniquePtrType to be consistent.
+
+            * wtf/Poisoned.h:
+            * wtf/PoisonedUniquePtr.h:
+
 2018-01-24  Jason Marcell  <[email protected]>
 
         Cherry-pick r227527. rdar://problem/36830339

Modified: branches/safari-605-branch/Source/WTF/wtf/Poisoned.h (227801 => 227802)


--- branches/safari-605-branch/Source/WTF/wtf/Poisoned.h	2018-01-30 18:49:52 UTC (rev 227801)
+++ branches/safari-605-branch/Source/WTF/wtf/Poisoned.h	2018-01-30 18:49:57 UTC (rev 227802)
@@ -79,7 +79,7 @@
 template<typename Poison, typename T, typename = std::enable_if_t<std::is_pointer<T>::value>>
 class Poisoned {
 public:
-    static constexpr bool isPoisoned = true;
+    static constexpr bool isPoisonedType = true;
 
     Poisoned() { }
 
@@ -91,7 +91,7 @@
 
     Poisoned(const Poisoned&) = default;
 
-    template<typename Other, typename = std::enable_if_t<Other::isPoisoned>>
+    template<typename Other, typename = std::enable_if_t<Other::isPoisonedType>>
     Poisoned(const Other& other)
         : m_poisonedBits(poison<T>(other.unpoisoned()))
     { }
@@ -153,7 +153,7 @@
         return *this;
     }
 
-    template<typename Other, typename = std::enable_if_t<Other::isPoisoned>>
+    template<typename Other, typename = std::enable_if_t<Other::isPoisonedType>>
     Poisoned& operator=(const Other& other)
     {
         m_poisonedBits = poison<T>(other.unpoisoned());
@@ -167,7 +167,7 @@
 
     void swap(std::nullptr_t) { clear(); }
 
-    template<typename Other, typename = std::enable_if_t<Other::isPoisoned>>
+    template<typename Other, typename = std::enable_if_t<Other::isPoisonedType>>
     void swap(Other& other)
     {
         T t1 = this->unpoisoned();
@@ -216,25 +216,25 @@
     template<typename, typename, typename> friend class Poisoned;
 };
 
-template<typename T, typename U, typename = std::enable_if_t<T::isPoisoned && U::isPoisoned && !std::is_same<T, U>::value>>
+template<typename T, typename U, typename = std::enable_if_t<T::isPoisonedType && U::isPoisonedType && !std::is_same<T, U>::value>>
 inline bool operator==(const T& a, const U& b) { return a.unpoisoned() == b.unpoisoned(); }
 
-template<typename T, typename U, typename = std::enable_if_t<T::isPoisoned && U::isPoisoned && !std::is_same<T, U>::value>>
+template<typename T, typename U, typename = std::enable_if_t<T::isPoisonedType && U::isPoisonedType && !std::is_same<T, U>::value>>
 inline bool operator!=(const T& a, const U& b) { return a.unpoisoned() != b.unpoisoned(); }
 
-template<typename T, typename U, typename = std::enable_if_t<T::isPoisoned && U::isPoisoned>>
+template<typename T, typename U, typename = std::enable_if_t<T::isPoisonedType && U::isPoisonedType>>
 inline bool operator<(const T& a, const U& b) { return a.unpoisoned() < b.unpoisoned(); }
 
-template<typename T, typename U, typename = std::enable_if_t<T::isPoisoned && U::isPoisoned>>
+template<typename T, typename U, typename = std::enable_if_t<T::isPoisonedType && U::isPoisonedType>>
 inline bool operator<=(const T& a, const U& b) { return a.unpoisoned() <= b.unpoisoned(); }
 
-template<typename T, typename U, typename = std::enable_if_t<T::isPoisoned && U::isPoisoned>>
+template<typename T, typename U, typename = std::enable_if_t<T::isPoisonedType && U::isPoisonedType>>
 inline bool operator>(const T& a, const U& b) { return a.unpoisoned() > b.unpoisoned(); }
 
-template<typename T, typename U, typename = std::enable_if_t<T::isPoisoned && U::isPoisoned>>
+template<typename T, typename U, typename = std::enable_if_t<T::isPoisonedType && U::isPoisonedType>>
 inline bool operator>=(const T& a, const U& b) { return a.unpoisoned() >= b.unpoisoned(); }
 
-template<typename T, typename U, typename = std::enable_if_t<T::isPoisoned>>
+template<typename T, typename U, typename = std::enable_if_t<T::isPoisonedType>>
 inline void swap(T& a, U& b)
 {
     a.swap(b);

Modified: branches/safari-605-branch/Source/WTF/wtf/PoisonedUniquePtr.h (227801 => 227802)


--- branches/safari-605-branch/Source/WTF/wtf/PoisonedUniquePtr.h	2018-01-30 18:49:52 UTC (rev 227801)
+++ branches/safari-605-branch/Source/WTF/wtf/PoisonedUniquePtr.h	2018-01-30 18:49:57 UTC (rev 227802)
@@ -38,7 +38,7 @@
     WTF_MAKE_FAST_ALLOCATED;
     using Base = Poisoned<Poison, T*>;
 public:
-    static constexpr bool isPoisonedUniquePtr = true;
+    static constexpr bool isPoisonedUniquePtrType = true;
     using ValueType = T;
 
     PoisonedUniquePtr() = default;
@@ -52,7 +52,7 @@
         : Base(unique.release())
     { }
 
-    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtr && std::is_base_of<T, typename Other::ValueType>::value>>
+    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtrType && std::is_base_of<T, typename Other::ValueType>::value>>
     PoisonedUniquePtr(Other&& ptr)
         : Base(ptr.unpoisoned())
     {
@@ -93,7 +93,7 @@
         return *this;
     }
 
-    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtr && std::is_base_of<T, typename Other::ValueType>::value>>
+    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtrType && std::is_base_of<T, typename Other::ValueType>::value>>
     PoisonedUniquePtr& operator=(Other&& ptr)
     {
         ASSERT(this == static_cast<void*>(&ptr) || this->unpoisoned() != ptr.unpoisoned());
@@ -134,7 +134,7 @@
     WTF_MAKE_FAST_ALLOCATED;
     using Base = Poisoned<Poison, T*>;
 public:
-    static constexpr bool isPoisonedUniquePtr = true;
+    static constexpr bool isPoisonedUniquePtrType = true;
     using ValueType = T[];
 
     PoisonedUniquePtr() = default;
@@ -143,7 +143,7 @@
     PoisonedUniquePtr(PoisonedUniquePtr&& ptr) : Base(WTFMove(ptr)) { ptr.clearWithoutDestroy(); }
     PoisonedUniquePtr(std::unique_ptr<T[]>&& unique) : PoisonedUniquePtr(unique.release()) { }
 
-    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtr && std::is_same<T[], typename Other::ValueType>::value>>
+    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtrType && std::is_same<T[], typename Other::ValueType>::value>>
     PoisonedUniquePtr(Other&& ptr)
         : Base(ptr.unpoisoned())
     {
@@ -179,7 +179,7 @@
         return *this;
     }
 
-    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtr && std::is_same<T[], typename Other::ValueType>::value>>
+    template<typename Other, typename = std::enable_if_t<Other::isPoisonedUniquePtrType && std::is_same<T[], typename Other::ValueType>::value>>
     PoisonedUniquePtr& operator=(Other&& ptr)
     {
         ASSERT(this == static_cast<void*>(&ptr) || this->unpoisoned() != ptr.unpoisoned());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to