Changeset 196800 in webkit


Ignore:
Timestamp:
Feb 18, 2016 10:53:54 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r196791.
https://bugs.webkit.org/show_bug.cgi?id=154438

broke windows build (Requested by alexchristensen on #webkit).

Reverted changeset:

"Extend HashCountedSet with a method to efficiently set the
count of an entry"
https://bugs.webkit.org/show_bug.cgi?id=154352
http://trac.webkit.org/changeset/196791

Location:
trunk
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r196791 r196800  
     12016-02-18  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r196791.
     4        https://bugs.webkit.org/show_bug.cgi?id=154438
     5
     6        broke windows build (Requested by alexchristensen on #webkit).
     7
     8        Reverted changeset:
     9
     10        "Extend HashCountedSet with a method to efficiently set the
     11        count of an entry"
     12        https://bugs.webkit.org/show_bug.cgi?id=154352
     13        http://trac.webkit.org/changeset/196791
     14
    1152016-02-18  Brent Fulgham  <bfulgham@apple.com>
    216
  • trunk/Source/WTF/wtf/HashCountedSet.h

    r196791 r196800  
    11/*
    2  * Copyright (C) 2005, 2006, 2008, 2013, 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2005, 2006, 2008, 2013 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2222#define WTF_HashCountedSet_h
    2323
    24 #include <initializer_list>
    2524#include <wtf/Assertions.h>
    2625#include <wtf/HashMap.h>
     
    3938        typedef typename ImplType::const_iterator const_iterator;
    4039        typedef typename ImplType::AddResult AddResult;
    41 
    42         HashCountedSet()
    43         {
    44         }
    45 
    46         HashCountedSet(std::initializer_list<typename ImplType::KeyValuePairType> initializerList)
    47         {
    48             for (const auto& keyValuePair : initializerList)
    49                 add(keyValuePair.key, keyValuePair.value);
    50         }
    51 
    52         HashCountedSet(std::initializer_list<typename ImplType::KeyType> initializerList)
    53         {
    54             for (const auto& value : initializerList)
    55                 add(value);
    56         }
    5740       
    5841        void swap(HashCountedSet&);
     
    7760        // and an isNewEntry bool that indicates whether it is a new or existing entry.
    7861        AddResult add(const ValueType&);
    79         AddResult add(ValueType&&);
    80 
    81         // Increments the count of a value by the passed amount.
    82         AddResult add(const ValueType&, unsigned);
    83         AddResult add(ValueType&&, unsigned);
    84 
     62       
    8563        // Decrements the count of the value, and removes it if count goes down to zero.
    8664        // Returns true if the value is removed.
     
    9674        void clear();
    9775
    98         // Overloads for smart pointer keys that take the raw pointer type as the parameter.
    99         template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, iterator>::type find(typename GetPtrHelper<V>::PtrType);
    100         template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, const_iterator>::type find(typename GetPtrHelper<V>::PtrType) const;
    101         template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, bool>::type contains(typename GetPtrHelper<V>::PtrType) const;
    102         template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, unsigned>::type count(typename GetPtrHelper<V>::PtrType) const;
    103         template<typename V = ValueType> typename std::enable_if<IsSmartPtr<V>::value, bool>::type remove(typename GetPtrHelper<V>::PtrType);
    104 
    10576    private:
    10677        ImplType m_impl;
    10778    };
    10879
    109 
    11080    template<typename Value, typename HashFunctions, typename Traits>
    11181    inline void HashCountedSet<Value, HashFunctions, Traits>::swap(HashCountedSet& other)
     
    185155        AddResult result = m_impl.add(value, 0);
    186156        ++result.iterator->value;
    187         return result;
    188     }
    189 
    190     template<typename Value, typename HashFunctions, typename Traits>
    191     inline typename HashCountedSet<Value, HashFunctions, Traits>::AddResult HashCountedSet<Value, HashFunctions, Traits>::add(ValueType&& value)
    192     {
    193         AddResult result = m_impl.add(std::forward<Value>(value), 0);
    194         ++result.iterator->value;
    195         return result;
    196     }
    197 
    198     template<typename Value, typename HashFunctions, typename Traits>
    199     inline typename HashCountedSet<Value, HashFunctions, Traits>::AddResult HashCountedSet<Value, HashFunctions, Traits>::add(const ValueType& value, unsigned count)
    200     {
    201         AddResult result = m_impl.add(value, 0);
    202         result.iterator->value += count;
    203         return result;
    204     }
    205    
    206     template<typename Value, typename HashFunctions, typename Traits>
    207     inline typename HashCountedSet<Value, HashFunctions, Traits>::AddResult HashCountedSet<Value, HashFunctions, Traits>::add(ValueType&& value, unsigned count)
    208     {
    209         AddResult result = m_impl.add(std::forward<Value>(value), 0);
    210         result.iterator->value += count;
    211157        return result;
    212158    }
     
    284230    }
    285231
    286     template<typename Value, typename HashFunctions, typename Traits>
    287     template<typename V>
    288     inline auto HashCountedSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) -> typename std::enable_if<IsSmartPtr<V>::value, iterator>::type
    289     {
    290         return m_impl.template find(value);
    291     }
    292    
    293     template<typename Value, typename HashFunctions, typename Traits>
    294     template<typename V>
    295     inline auto HashCountedSet<Value, HashFunctions, Traits>::find(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, const_iterator>::type
    296     {
    297         return m_impl.template find(value);
    298     }
    299    
    300     template<typename Value, typename HashFunctions, typename Traits>
    301     template<typename V>
    302     inline auto HashCountedSet<Value, HashFunctions, Traits>::contains(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, bool>::type
    303     {
    304         return m_impl.template contains(value);
    305     }
    306    
    307     template<typename Value, typename HashFunctions, typename Traits>
    308     template<typename V>
    309     inline auto HashCountedSet<Value, HashFunctions, Traits>::count(typename GetPtrHelper<V>::PtrType value) const -> typename std::enable_if<IsSmartPtr<V>::value, unsigned>::type
    310     {
    311         return m_impl.template get(value);
    312     }
    313    
    314     template<typename Value, typename HashFunctions, typename Traits>
    315     template<typename V>
    316     inline auto HashCountedSet<Value, HashFunctions, Traits>::remove(typename GetPtrHelper<V>::PtrType value) -> typename std::enable_if<IsSmartPtr<V>::value, bool>::type
    317     {
    318         return remove(find(value));
    319     }
    320 
    321 } // namespace WTF
     232
     233} // namespace khtml
    322234
    323235using WTF::HashCountedSet;
  • trunk/Source/WebCore/ChangeLog

    r196797 r196800  
     12016-02-18  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r196791.
     4        https://bugs.webkit.org/show_bug.cgi?id=154438
     5
     6        broke windows build (Requested by alexchristensen on #webkit).
     7
     8        Reverted changeset:
     9
     10        "Extend HashCountedSet with a method to efficiently set the
     11        count of an entry"
     12        https://bugs.webkit.org/show_bug.cgi?id=154352
     13        http://trac.webkit.org/changeset/196791
     14
    1152016-02-18  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp

    r196791 r196800  
    125125        if (!decoderInner.decodeUInt32("count", count))
    126126            return false;
    127 
    128         hashCountedSet.add(origin, count);
     127       
     128        // FIXME: Create a HashCountedSet method to do this efficiently
     129        for (unsigned i = 0; i < count; ++i)
     130            hashCountedSet.add(origin);
    129131        return true;
    130132    });
  • trunk/Tools/ChangeLog

    r196791 r196800  
     12016-02-18  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r196791.
     4        https://bugs.webkit.org/show_bug.cgi?id=154438
     5
     6        broke windows build (Requested by alexchristensen on #webkit).
     7
     8        Reverted changeset:
     9
     10        "Extend HashCountedSet with a method to efficiently set the
     11        count of an entry"
     12        https://bugs.webkit.org/show_bug.cgi?id=154352
     13        http://trac.webkit.org/changeset/196791
     14
    1152016-02-18  Brent Fulgham  <bfulgham@apple.com>
    216
  • trunk/Tools/TestWebKitAPI/CMakeLists.txt

    r196791 r196800  
    4848    ${TESTWEBKITAPI_DIR}/Tests/WTF/Deque.cpp
    4949    ${TESTWEBKITAPI_DIR}/Tests/WTF/Functional.cpp
    50     ${TESTWEBKITAPI_DIR}/Tests/WTF/HashCountedSet.cpp
    5150    ${TESTWEBKITAPI_DIR}/Tests/WTF/HashMap.cpp
    5251    ${TESTWEBKITAPI_DIR}/Tests/WTF/HashSet.cpp
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r196791 r196800  
    8080                76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 76E182DE15475A8300F1FADD /* auto-submitting-form.html */; };
    8181                7A1458FC1AD5C07000E06772 /* mouse-button-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */; };
    82                 7A38D7E61C752D5F004F157D /* HashCountedSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A38D7E51C752D5F004F157D /* HashCountedSet.cpp */; };
    8382                7A5623111AD5AF3E0096B920 /* MenuTypesForMouseEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A5623101AD5AF3E0096B920 /* MenuTypesForMouseEvents.cpp */; };
    8483                7A99D9941AD4A29D00373141 /* MenuTypesForMouseEvents.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A99D9931AD4A29D00373141 /* MenuTypesForMouseEvents.mm */; };
     
    612611                76E182DE15475A8300F1FADD /* auto-submitting-form.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "auto-submitting-form.html"; sourceTree = "<group>"; };
    613612                7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "mouse-button-listener.html"; sourceTree = "<group>"; };
    614                 7A38D7E51C752D5F004F157D /* HashCountedSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HashCountedSet.cpp; sourceTree = "<group>"; };
    615613                7A5623101AD5AF3E0096B920 /* MenuTypesForMouseEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MenuTypesForMouseEvents.cpp; sourceTree = "<group>"; };
    616614                7A99D9931AD4A29D00373141 /* MenuTypesForMouseEvents.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MenuTypesForMouseEvents.mm; sourceTree = "<group>"; };
     
    12311229                                E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */,
    12321230                                1AA9E55714980A9900001A8A /* Functional.cpp */,
    1233                                 7A38D7E51C752D5F004F157D /* HashCountedSet.cpp */,
    12341231                                0BCD833414857CE400EA2003 /* HashMap.cpp */,
    12351232                                26B2DFF815BDE599004F691D /* HashSet.cpp */,
     
    18671864                                1A4F81CC1BDFFD37004E672E /* RemoteObjectRegistry.mm in Sources */,
    18681865                                51CB4AD81B3A079C00C1B1C6 /* ModalAlertsSPI.cpp in Sources */,
    1869                                 7A38D7E61C752D5F004F157D /* HashCountedSet.cpp in Sources */,
    18701866                                9B7916501BD89D0D00D50B8F /* FirstResponderScrollingPosition.mm in Sources */,
    18711867                                1CF0D3791BBF2F3D00B4EF54 /* WKRetainPtr.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.