⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203306 in webkit


Ignore:
Timestamp:
Jul 15, 2016, 3:38:30 PM (10 years ago)
Author:
Chris Dumez
Message:

Unreviewed, rolling out r203304.

This is wrong because of Node* entries in the internal HashMap

Reverted changeset:

"Add move constructor / assignment operator to ListHashSet"
https://bugs.webkit.org/show_bug.cgi?id=159837
http://trac.webkit.org/changeset/203304

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r203304 r203306  
     12016-07-15  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r203304.
     4
     5        This is wrong because of Node* entries in the internal HashMap
     6
     7        Reverted changeset:
     8
     9        "Add move constructor / assignment operator to ListHashSet"
     10        https://bugs.webkit.org/show_bug.cgi?id=159837
     11        http://trac.webkit.org/changeset/203304
     12
    1132016-07-15  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WTF/wtf/ListHashSet.h

    r203304 r203306  
    2020 */
    2121
    22 #pragma once
     22#ifndef WTF_ListHashSet_h
     23#define WTF_ListHashSet_h
    2324
    2425#include <wtf/HashSet.h>
     
    6970    typedef HashTableAddResult<iterator> AddResult;
    7071
    71     ListHashSet() = default;
     72    ListHashSet();
    7273    ListHashSet(const ListHashSet&);
    73     ListHashSet(ListHashSet&&) = default;
    7474    ListHashSet& operator=(const ListHashSet&);
    75     ListHashSet& operator=(ListHashSet&&) = default;
    7675    ~ListHashSet();
    7776
     
    151150
    152151    HashTable<Node*, Node*, IdentityExtractor, NodeHash, NodeTraits, NodeTraits> m_impl;
    153     Node* m_head { nullptr };
    154     Node* m_tail { nullptr };
     152    Node* m_head;
     153    Node* m_tail;
    155154};
    156155
     
    161160    ListHashSetNode(T&& value)
    162161        : m_value(std::forward<T>(value))
     162        , m_prev(0)
     163        , m_next(0)
    163164    {
    164165    }
    165166
    166167    ValueArg m_value;
    167     ListHashSetNode* m_prev { nullptr };
    168     ListHashSetNode* m_next { nullptr };
     168    ListHashSetNode* m_prev;
     169    ListHashSetNode* m_next;
    169170};
    170171
     
    260261    const_iterator& operator++()
    261262    {
    262         ASSERT(m_position);
     263        ASSERT(m_position != 0);
    263264        m_position = m_position->m_next;
    264265        return *this;
     
    307308
    308309template<typename T, typename U>
     310inline ListHashSet<T, U>::ListHashSet()
     311    : m_head(0)
     312    , m_tail(0)
     313{
     314}
     315
     316template<typename T, typename U>
    309317inline ListHashSet<T, U>::ListHashSet(const ListHashSet& other)
     318    : m_head(0)
     319    , m_tail(0)
    310320{
    311321    for (auto it = other.begin(), end = other.end(); it != end; ++it)
     
    593603    deleteAllNodes();
    594604    m_impl.clear();
    595     m_head = nullptr;
    596     m_tail = nullptr;
     605    m_head = 0;
     606    m_tail = 0;
    597607}
    598608
     
    628638{
    629639    node->m_prev = m_tail;
    630     node->m_next = nullptr;
     640    node->m_next = 0;
    631641
    632642    if (m_tail) {
     
    644654void ListHashSet<T, U>::prependNode(Node* node)
    645655{
    646     node->m_prev = nullptr;
     656    node->m_prev = 0;
    647657    node->m_next = m_head;
    648658
     
    677687        return;
    678688
    679     for (Node* node = m_head, *next = m_head->m_next; node; node = next, next = node ? node->m_next : nullptr)
     689    for (Node* node = m_head, *next = m_head->m_next; node; node = next, next = node ? node->m_next : 0)
    680690        delete node;
    681691}
     
    696706
    697707using WTF::ListHashSet;
     708
     709#endif /* WTF_ListHashSet_h */
Note: See TracChangeset for help on using the changeset viewer.