Ignore:
Timestamp:
Jan 27, 2010, 1:06:28 AM (15 years ago)
Author:
[email protected]
Message:

Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent bug fixes,
because they make SVG tests crash in release builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/HashTable.h

    r53901 r53912  
    3131
    3232#define DUMP_HASHTABLE_STATS 0
    33 // Enables internal WTF consistency checks that are invoked automatically. Non-WTF callers can call checkTableConsistency() even if internal checks are disabled.
    3433#define CHECK_HASHTABLE_CONSISTENCY 0
    3534
     
    342341        template<typename T, typename HashTranslator> ValueType* lookup(const T&);
    343342
    344 #if !ASSERT_DISABLED
     343#if CHECK_HASHTABLE_CONSISTENCY
    345344        void checkTableConsistency() const;
    346345#else
    347346        static void checkTableConsistency() { }
    348 #endif
    349 #if CHECK_HASHTABLE_CONSISTENCY
    350         void internalCheckTableConsistency() const { checkTableConsistency(); }
    351         void internalCheckTableConsistencyExceptSize() const { checkTableConsistencyExceptSize(); }
    352 #else
    353         static void internalCheckTableConsistencyExceptSize() { }
    354         static void internalCheckTableConsistency() { }
    355347#endif
    356348
     
    392384        const_iterator makeKnownGoodConstIterator(ValueType* pos) const { return const_iterator(this, pos, m_table + m_tableSize, HashItemKnownGood); }
    393385
    394 #if !ASSERT_DISABLED
     386#if CHECK_HASHTABLE_CONSISTENCY
    395387        void checkTableConsistencyExceptSize() const;
    396388#else
     
    633625            expand();
    634626
    635         internalCheckTableConsistency();
     627        checkTableConsistency();
    636628
    637629        ASSERT(m_table);
     
    702694        }
    703695       
    704         internalCheckTableConsistency();
     696        checkTableConsistency();
    705697       
    706698        return std::make_pair(makeKnownGoodIterator(entry), true);
     
    718710            expand();
    719711
    720         internalCheckTableConsistency();
     712        checkTableConsistency();
    721713
    722714        FullLookupType lookupResult = fullLookupForWriting<T, HashTranslator>(key);
     
    747739        }
    748740
    749         internalCheckTableConsistency();
     741        checkTableConsistency();
    750742
    751743        return std::make_pair(makeKnownGoodIterator(entry), true);
     
    814806    {
    815807        invalidateIterators();
    816         internalCheckTableConsistency();
     808        checkTableConsistency();
    817809        remove(pos);
    818810    }
     
    832824            shrink();
    833825
    834         internalCheckTableConsistency();
     826        checkTableConsistency();
    835827    }
    836828
     
    901893    void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::rehash(int newTableSize)
    902894    {
    903         internalCheckTableConsistencyExceptSize();
     895        checkTableConsistencyExceptSize();
    904896
    905897        int oldTableSize = m_tableSize;
     
    923915        deallocateTable(oldTable, oldTableSize);
    924916
    925         internalCheckTableConsistency();
     917        checkTableConsistency();
    926918    }
    927919
     
    990982    }
    991983
    992 #if !ASSERT_DISABLED
     984#if CHECK_HASHTABLE_CONSISTENCY
    993985
    994986    template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
     
    996988    {
    997989        checkTableConsistencyExceptSize();
    998         ASSERT(!m_table || !shouldExpand());
     990        ASSERT(!shouldExpand());
    999991        ASSERT(!shouldShrink());
    1000992    }
     
    10211013            ASSERT(entry == it.m_position);
    10221014            ++count;
    1023 
    1024             KeyTraits::checkValueConsistency(it->first);
    10251015        }
    10261016
     
    10321022    }
    10331023
    1034 #endif // ASSERT_DISABLED
     1024#endif // CHECK_HASHTABLE_CONSISTENCY
    10351025
    10361026#if CHECK_HASHTABLE_ITERATORS
Note: See TracChangeset for help on using the changeset viewer.