Title: [261486] trunk/Source/WTF
- Revision
- 261486
- Author
- ryanhad...@apple.com
- Date
- 2020-05-11 12:05:00 -0700 (Mon, 11 May 2020)
Log Message
Unreviewed, reverting r261440.
Caused 6 TestWTF.WTF failures
Reverted changeset:
"Add iterator checking to ListHashSet"
https://bugs.webkit.org/show_bug.cgi?id=211669
https://trac.webkit.org/changeset/261440
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (261485 => 261486)
--- trunk/Source/WTF/ChangeLog 2020-05-11 18:59:22 UTC (rev 261485)
+++ trunk/Source/WTF/ChangeLog 2020-05-11 19:05:00 UTC (rev 261486)
@@ -1,3 +1,15 @@
+2020-05-11 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, reverting r261440.
+
+ Caused 6 TestWTF.WTF failures
+
+ Reverted changeset:
+
+ "Add iterator checking to ListHashSet"
+ https://bugs.webkit.org/show_bug.cgi?id=211669
+ https://trac.webkit.org/changeset/261440
+
2020-05-11 Tetsuharu Ohzeki <tetsuharu.ohz...@gmail.com>
Use alias template for <type_traits> in WTF/wtf/TypeCast.h
Modified: trunk/Source/WTF/wtf/ListHashSet.h (261485 => 261486)
--- trunk/Source/WTF/wtf/ListHashSet.h 2020-05-11 18:59:22 UTC (rev 261485)
+++ trunk/Source/WTF/wtf/ListHashSet.h 2020-05-11 19:05:00 UTC (rev 261486)
@@ -23,10 +23,6 @@
#include <wtf/HashSet.h>
-#if CHECK_HASHTABLE_ITERATORS
-#include <wtf/WeakPtr.h>
-#endif
-
namespace WTF {
// ListHashSet: Just like HashSet, this class provides a Set
@@ -49,11 +45,7 @@
template<typename HashArg> struct ListHashSetNodeHashFunctions;
template<typename HashArg> struct ListHashSetTranslator;
-template<typename ValueArg, typename HashArg = typename DefaultHash<ValueArg>::Hash> class ListHashSet final
-#if CHECK_HASHTABLE_ITERATORS
- : public CanMakeWeakPtr<ListHashSet<ValueArg, HashArg>>
-#endif
-{
+template<typename ValueArg, typename HashArg = typename DefaultHash<ValueArg>::Hash> class ListHashSet final {
WTF_MAKE_FAST_ALLOCATED;
private:
typedef ListHashSetNode<ValueArg> Node;
@@ -172,14 +164,11 @@
Node* m_tail { nullptr };
};
-template<typename ValueArg> struct ListHashSetNode
-#if CHECK_HASHTABLE_ITERATORS
- : CanMakeWeakPtr<ListHashSetNode<ValueArg>>
-#endif
-{
- WTF_MAKE_STRUCT_FAST_ALLOCATED;
-
- template<typename T> ListHashSetNode(T&& value)
+template<typename ValueArg> struct ListHashSetNode {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ template<typename T>
+ ListHashSetNode(T&& value)
: m_value(std::forward<T>(value))
{
}
@@ -258,10 +247,6 @@
ListHashSetConstIterator(const ListHashSetType* set, Node* position)
: m_set(set)
, m_position(position)
-#if CHECK_HASHTABLE_ITERATORS
- , m_weakSet(makeWeakPtr(set))
- , m_weakPosition(makeWeakPtr(position))
-#endif
{
}
@@ -278,9 +263,6 @@
const ValueType* get() const
{
-#if CHECK_HASHTABLE_ITERATORS
- ASSERT(m_weakPosition);
-#endif
return std::addressof(m_position->m_value);
}
@@ -289,14 +271,8 @@
const_iterator& operator++()
{
-#if CHECK_HASHTABLE_ITERATORS
- ASSERT(m_weakPosition);
-#endif
ASSERT(m_position);
m_position = m_position->m_next;
-#if CHECK_HASHTABLE_ITERATORS
- m_weakPosition = makeWeakPtr(m_position);
-#endif
return *this;
}
@@ -304,18 +280,11 @@
const_iterator& operator--()
{
-#if CHECK_HASHTABLE_ITERATORS
- ASSERT(m_weakSet);
- m_weakPosition.get();
-#endif
ASSERT(m_position != m_set->m_head);
if (!m_position)
m_position = m_set->m_tail;
else
m_position = m_position->m_prev;
-#if CHECK_HASHTABLE_ITERATORS
- m_weakPosition = makeWeakPtr(m_position);
-#endif
return *this;
}
@@ -334,12 +303,8 @@
private:
Node* node() { return m_position; }
- const ListHashSetType* m_set { nullptr };
- Node* m_position { nullptr };
-#if CHECK_HASHTABLE_ITERATORS
- WeakPtr<const ListHashSetType> m_weakSet;
- WeakPtr<Node> m_weakPosition;
-#endif
+ const ListHashSetType* m_set;
+ Node* m_position;
};
template<typename HashFunctions>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes