Changeset 157387 in webkit


Ignore:
Timestamp:
Oct 13, 2013 10:58:34 PM (11 years ago)
Author:
Darin Adler
Message:

Deprecate or remove deleteAllValues functions; there are only a few call sites left
https://bugs.webkit.org/show_bug.cgi?id=122738

Reviewed by Anders Carlsson.

Source/WebCore:

  • platform/blackberry/CookieMap.cpp:

(WebCore::CookieMap::deleteAllCookiesAndDomains):

  • platform/network/blackberry/rss/RSSParserBase.cpp:

(WebCore::RSSFeed::clear):

  • platform/win/WCDataObject.cpp:

(WebCore::WCDataObject::~WCDataObject):
Renamed deleteAllValues to deprecatedDeleteAllValues.

Source/WebKit/blackberry:

  • WebKitSupport/InPageSearchManager.cpp:

(BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
Renamed deleteAllValues to deprecatedDeleteAllValues.

Source/WebKit2:

  • Shared/Plugins/NPRemoteObjectMap.cpp:

(WebKit::NPRemoteObjectMap::pluginDestroyed): Renamed deleteAllValues to
deprecatedDeleteAllValues.

Source/WTF:

  • wtf/Deque.h: Deleted deleteAllValues.
  • wtf/HashMap.h: Ditto.
  • wtf/HashSet.h: Ditto.
  • wtf/ListHashSet.h: Ditto.
  • wtf/Vector.h: Renamed deleteAllValues to deprecatedDeleteAllValues.

Tools:

  • DumpRenderTree/win/DRTDataObject.cpp:

(DRTDataObject::~DRTDataObject):

  • DumpRenderTree/win/UIDelegate.cpp:

(DRTUndoStack::~DRTUndoStack):
(DRTUndoStack::clear):
Renamed deleteAllValues to deprecatedDeleteAllValues.

  • Scripts/do-webcore-rename: Updated to perform this rename, as is traditional.
Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r157380 r157387  
     12013-10-13  Darin Adler  <darin@apple.com>
     2
     3        Deprecate or remove deleteAllValues functions; there are only a few call sites left
     4        https://bugs.webkit.org/show_bug.cgi?id=122738
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * wtf/Deque.h: Deleted deleteAllValues.
     9        * wtf/HashMap.h: Ditto.
     10        * wtf/HashSet.h: Ditto.
     11        * wtf/ListHashSet.h: Ditto.
     12        * wtf/Vector.h: Renamed deleteAllValues to deprecatedDeleteAllValues.
     13
    114== Rolled over to ChangeLog-2013-10-13 ==
  • trunk/Source/WTF/wtf/Deque.h

    r156972 r157387  
    290290
    291291    template<typename T, size_t inlineCapacity>
    292     void deleteAllValues(const Deque<T, inlineCapacity>& collection)
    293     {
    294         typedef typename Deque<T, inlineCapacity>::const_iterator iterator;
    295         iterator end = collection.end();
    296         for (iterator it = collection.begin(); it != end; ++it)
    297             delete *it;
    298     }
    299 
    300     template<typename T, size_t inlineCapacity>
    301292    inline Deque<T, inlineCapacity>& Deque<T, inlineCapacity>::operator=(const Deque<T, inlineCapacity>& other)
    302293    {
  • trunk/Source/WTF/wtf/HashMap.h

    r157077 r157387  
    470470}
    471471
    472 template<typename T, typename U, typename V, typename W, typename X>
    473 inline void deleteAllValues(const HashMap<T, U, V, W, X>& collection)
    474 {
    475     typedef typename HashMap<T, U, V, W, X>::const_iterator iterator;
    476     iterator end = collection.end();
    477     for (iterator it = collection.begin(); it != end; ++it)
    478         delete it->value;
    479 }
    480 
    481472template<typename T, typename U, typename V, typename W, typename X, typename Y>
    482473inline void copyKeysToVector(const HashMap<T, U, V, W, X>& collection, Y& vector)
  • trunk/Source/WTF/wtf/HashSet.h

    r157077 r157387  
    3030   
    3131    template<typename Value, typename HashFunctions, typename Traits> class HashSet;
    32     template<typename Value, typename HashFunctions, typename Traits>
    33     void deleteAllValues(const HashSet<Value, HashFunctions, Traits>&);
    3432
    3533    template<typename ValueArg, typename HashArg = typename DefaultHash<ValueArg>::Hash,
     
    10199
    102100    private:
    103         friend void deleteAllValues<>(const HashSet&);
    104 
    105101        HashTableType m_impl;
    106102    };
     
    262258    }
    263259
    264     template<typename ValueType, typename HashTableType>
    265     void deleteAllValues(HashTableType& collection)
    266     {
    267         typedef typename HashTableType::const_iterator iterator;
    268         iterator end = collection.end();
    269         for (iterator it = collection.begin(); it != end; ++it)
    270             delete *it;
    271     }
    272 
    273     template<typename T, typename U, typename V>
    274     inline void deleteAllValues(const HashSet<T, U, V>& collection)
    275     {
    276         deleteAllValues<typename HashSet<T, U, V>::ValueType>(collection.m_impl);
    277     }
    278 
    279260    template<typename C, typename W>
    280261    inline void copyToVector(const C& collection, W& vector)
  • trunk/Source/WTF/wtf/ListHashSet.h

    r156968 r157387  
    4141template<typename Value, size_t inlineCapacity, typename HashFunctions> class ListHashSet;
    4242
    43 template<typename Value, size_t inlineCapacity, typename HashFunctions>
    44 void deleteAllValues(const ListHashSet<Value, inlineCapacity, HashFunctions>&);
    45 
    4643template<typename ValueArg, size_t inlineCapacity, typename HashArg> class ListHashSetIterator;
    4744template<typename ValueArg, size_t inlineCapacity, typename HashArg> class ListHashSetConstIterator;
     
    155152    iterator makeIterator(Node*);
    156153    const_iterator makeConstIterator(Node*) const;
    157 
    158     friend void deleteAllValues<>(const ListHashSet&);
    159154
    160155    HashTable<Node*, Node*, IdentityExtractor, NodeHash, NodeTraits, NodeTraits> m_impl;
     
    801796}
    802797
    803 template<bool, typename ValueType, typename HashTableType>
    804 void deleteAllValues(HashTableType& collection)
    805 {
    806     for (auto it = collection.begin(), end = collection.end(); it != end; ++it)
    807         delete (*it)->m_value;
    808 }
    809 
    810 template<typename T, size_t inlineCapacity, typename U>
    811 inline void deleteAllValues(const ListHashSet<T, inlineCapacity, U>& collection)
    812 {
    813     deleteAllValues<true, typename ListHashSet<T, inlineCapacity, U>::ValueType>(collection.m_impl);
    814 }
    815 
    816798} // namespace WTF
    817799
  • trunk/Source/WTF/wtf/Vector.h

    r157074 r157387  
    11691169
    11701170template<typename T, size_t inlineCapacity, typename OverflowHandler>
    1171 void deleteAllValues(const Vector<T, inlineCapacity, OverflowHandler>& collection)
     1171void deprecatedDeleteAllValues(const Vector<T, inlineCapacity, OverflowHandler>& collection)
    11721172{
    11731173    typedef typename Vector<T, inlineCapacity, OverflowHandler>::const_iterator iterator;
  • trunk/Source/WebCore/ChangeLog

    r157385 r157387  
     12013-10-13  Darin Adler  <darin@apple.com>
     2
     3        Deprecate or remove deleteAllValues functions; there are only a few call sites left
     4        https://bugs.webkit.org/show_bug.cgi?id=122738
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * platform/blackberry/CookieMap.cpp:
     9        (WebCore::CookieMap::deleteAllCookiesAndDomains):
     10        * platform/network/blackberry/rss/RSSParserBase.cpp:
     11        (WebCore::RSSFeed::clear):
     12        * platform/win/WCDataObject.cpp:
     13        (WebCore::WCDataObject::~WCDataObject):
     14        Renamed deleteAllValues to deprecatedDeleteAllValues.
     15
    1162013-10-13  Sam Weinig  <sam@webkit.org>
    217
  • trunk/Source/WebCore/platform/blackberry/CookieMap.cpp

    r145163 r157387  
    201201void CookieMap::deleteAllCookiesAndDomains()
    202202{
    203     deleteAllValues(m_subdomains);
     203    deprecatedDeleteAllValues(m_subdomains);
    204204    m_subdomains.clear();
    205205    m_cookieVector.clear();
  • trunk/Source/WebCore/platform/network/blackberry/rss/RSSParserBase.cpp

    r128647 r157387  
    7878void RSSFeed::clear()
    7979{
    80     deleteAllValues(m_items);
     80    deprecatedDeleteAllValues(m_items);
    8181    m_items.clear();
    8282}
  • trunk/Source/WebCore/platform/win/WCDataObject.cpp

    r130612 r157387  
    185185        delete m_medium[i];
    186186    }
    187     WTF::deleteAllValues(m_formats);
     187    WTF::deprecatedDeleteAllValues(m_formats);
    188188}
    189189
  • trunk/Source/WebKit/blackberry/ChangeLog

    r157357 r157387  
     12013-10-13  Darin Adler  <darin@apple.com>
     2
     3        Deprecate or remove deleteAllValues functions; there are only a few call sites left
     4        https://bugs.webkit.org/show_bug.cgi?id=122738
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebKitSupport/InPageSearchManager.cpp:
     9        (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
     10        Renamed deleteAllValues to deprecatedDeleteAllValues.
     11
    1122013-10-12  Darin Adler  <darin@apple.com>
    213
  • trunk/Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp

    r155228 r157387  
    390390void InPageSearchManager::cancelPendingScopingEffort()
    391391{
    392     deleteAllValues(m_deferredScopingWork);
     392    deprecatedDeleteAllValues(m_deferredScopingWork);
    393393    m_deferredScopingWork.clear();
    394394}
  • trunk/Source/WebKit2/ChangeLog

    r157380 r157387  
     12013-10-13  Darin Adler  <darin@apple.com>
     2
     3        Deprecate or remove deleteAllValues functions; there are only a few call sites left
     4        https://bugs.webkit.org/show_bug.cgi?id=122738
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * Shared/Plugins/NPRemoteObjectMap.cpp:
     9        (WebKit::NPRemoteObjectMap::pluginDestroyed): Renamed deleteAllValues to
     10        deprecatedDeleteAllValues.
     11
    112== Rolled over to ChangeLog-2013-10-13 ==
  • trunk/Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp

    r157162 r157387  
    207207
    208208    // Now delete all the receivers.
    209     deleteAllValues(messageReceivers);
     209    deprecatedDeleteAllValues(messageReceivers);
    210210
    211211    Vector<NPObjectProxy*> objectProxies;
  • trunk/Tools/ChangeLog

    r157386 r157387  
     12013-10-13  Darin Adler  <darin@apple.com>
     2
     3        Deprecate or remove deleteAllValues functions; there are only a few call sites left
     4        https://bugs.webkit.org/show_bug.cgi?id=122738
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * DumpRenderTree/win/DRTDataObject.cpp:
     9        (DRTDataObject::~DRTDataObject):
     10        * DumpRenderTree/win/UIDelegate.cpp:
     11        (DRTUndoStack::~DRTUndoStack):
     12        (DRTUndoStack::clear):
     13        Renamed deleteAllValues to deprecatedDeleteAllValues.
     14
     15        * Scripts/do-webcore-rename: Updated to perform this rename, as is traditional.
     16
    1172013-10-13  Alexey Proskuryakov  <ap@apple.com>
    218
  • trunk/Tools/DumpRenderTree/win/DRTDataObject.cpp

    r118941 r157387  
    182182        delete m_medium[i];
    183183    }
    184     WTF::deleteAllValues(m_formats);
     184    WTF::deprecatedDeleteAllValues(m_formats);
    185185}
    186186
  • trunk/Tools/DumpRenderTree/win/UIDelegate.cpp

    r129595 r157387  
    7373class DRTUndoStack {
    7474public:
    75     ~DRTUndoStack() { deleteAllValues(m_undoVector); }
     75    ~DRTUndoStack() { deprecatedDeleteAllValues(m_undoVector); }
    7676
    7777    bool isEmpty() const { return m_undoVector.isEmpty(); }
    78     void clear() { deleteAllValues(m_undoVector); m_undoVector.clear(); }
     78    void clear() { deprecatedDeleteAllValues(m_undoVector); m_undoVector.clear(); }
    7979
    8080    void push(DRTUndoObject* undoObject) { m_undoVector.append(undoObject); }
  • trunk/Tools/Scripts/do-webcore-rename

    r156550 r157387  
    7171my @paths;
    7272find(\&wanted, "Source/JavaScriptCore");
     73find(\&wanted, "Source/WTF");
    7374find(\&wanted, "Source/WebCore");
    7475find(\&wanted, "Source/WebKit");
     
    9899my %renames = (
    99100    # Renames go here in the form of:
    100     "WKURL" => "WKURL",
    101     "KURL" => "URL",
    102     "KURLCFNet" => "URLCF",
    103     "KURLHash" => "URLHash",
    104     "KURLMac" => "URLMac",
    105     "KURL_h" => "URL_h",
     101    "deleteAllValues" => "deprecatedDeleteAllValues",
    106102);
    107103
    108104my %renamesContemplatedForTheFuture = (
    109105    "HTMLPlugInImageElement" => "HTMLEmbeddedObjectElement",
     106    "isPlugInImageElement" => "isEmbeddedObjectElement",
     107    "isHTMLPlugInImageElement" => "isHTMLEmbeddedObjectElement",
     108    "toHTMLPlugInImageElement" => "toHTMLEmbeddedObjectElement",
    110109
    111110    "DOMObject" => "JSDOMObject",
Note: See TracChangeset for help on using the changeset viewer.