Deprecate or remove deleteAllValues functions; there are only a few call sites left
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Oct 2013 05:58:34 +0000 (05:58 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Oct 2013 05:58:34 +0000 (05:58 +0000)
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157387 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Deque.h
Source/WTF/wtf/HashMap.h
Source/WTF/wtf/HashSet.h
Source/WTF/wtf/ListHashSet.h
Source/WTF/wtf/Vector.h
Source/WebCore/ChangeLog
Source/WebCore/platform/blackberry/CookieMap.cpp
Source/WebCore/platform/network/blackberry/rss/RSSParserBase.cpp
Source/WebCore/platform/win/WCDataObject.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp
Tools/ChangeLog
Tools/DumpRenderTree/win/DRTDataObject.cpp
Tools/DumpRenderTree/win/UIDelegate.cpp
Tools/Scripts/do-webcore-rename

index 4ad1382..22acf8c 100644 (file)
@@ -1 +1,14 @@
+2013-10-13  Darin Adler  <darin@apple.com>
+
+        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.
+
+        * wtf/Deque.h: Deleted deleteAllValues.
+        * wtf/HashMap.h: Ditto.
+        * wtf/HashSet.h: Ditto.
+        * wtf/ListHashSet.h: Ditto.
+        * wtf/Vector.h: Renamed deleteAllValues to deprecatedDeleteAllValues.
+
 == Rolled over to ChangeLog-2013-10-13 ==
index b47711f..6203090 100644 (file)
@@ -289,15 +289,6 @@ namespace WTF {
     }
 
     template<typename T, size_t inlineCapacity>
-    void deleteAllValues(const Deque<T, inlineCapacity>& collection)
-    {
-        typedef typename Deque<T, inlineCapacity>::const_iterator iterator;
-        iterator end = collection.end();
-        for (iterator it = collection.begin(); it != end; ++it)
-            delete *it;
-    }
-
-    template<typename T, size_t inlineCapacity>
     inline Deque<T, inlineCapacity>& Deque<T, inlineCapacity>::operator=(const Deque<T, inlineCapacity>& other)
     {
         // FIXME: This is inefficient if we're using an inline buffer and T is
index df53da6..c46f76e 100644 (file)
@@ -469,15 +469,6 @@ inline bool operator!=(const HashMap<T, U, V, W, X>& a, const HashMap<T, U, V, W
     return !(a == b);
 }
 
-template<typename T, typename U, typename V, typename W, typename X>
-inline void deleteAllValues(const HashMap<T, U, V, W, X>& collection)
-{
-    typedef typename HashMap<T, U, V, W, X>::const_iterator iterator;
-    iterator end = collection.end();
-    for (iterator it = collection.begin(); it != end; ++it)
-        delete it->value;
-}
-
 template<typename T, typename U, typename V, typename W, typename X, typename Y>
 inline void copyKeysToVector(const HashMap<T, U, V, W, X>& collection, Y& vector)
 {
index 8113b79..a3a1287 100644 (file)
@@ -29,8 +29,6 @@ namespace WTF {
     struct IdentityExtractor;
     
     template<typename Value, typename HashFunctions, typename Traits> class HashSet;
-    template<typename Value, typename HashFunctions, typename Traits>
-    void deleteAllValues(const HashSet<Value, HashFunctions, Traits>&);
 
     template<typename ValueArg, typename HashArg = typename DefaultHash<ValueArg>::Hash,
         typename TraitsArg = HashTraits<ValueArg> > class HashSet {
@@ -100,8 +98,6 @@ namespace WTF {
         bool operator==(const HashSet&) const;
 
     private:
-        friend void deleteAllValues<>(const HashSet&);
-
         HashTableType m_impl;
     };
 
@@ -261,21 +257,6 @@ namespace WTF {
         return true;
     }
 
-    template<typename ValueType, typename HashTableType>
-    void deleteAllValues(HashTableType& collection)
-    {
-        typedef typename HashTableType::const_iterator iterator;
-        iterator end = collection.end();
-        for (iterator it = collection.begin(); it != end; ++it)
-            delete *it;
-    }
-
-    template<typename T, typename U, typename V>
-    inline void deleteAllValues(const HashSet<T, U, V>& collection)
-    {
-        deleteAllValues<typename HashSet<T, U, V>::ValueType>(collection.m_impl);
-    }
-
     template<typename C, typename W>
     inline void copyToVector(const C& collection, W& vector)
     {
index d6779b1..ac04c42 100644 (file)
@@ -40,9 +40,6 @@ namespace WTF {
 
 template<typename Value, size_t inlineCapacity, typename HashFunctions> class ListHashSet;
 
-template<typename Value, size_t inlineCapacity, typename HashFunctions>
-void deleteAllValues(const ListHashSet<Value, inlineCapacity, HashFunctions>&);
-
 template<typename ValueArg, size_t inlineCapacity, typename HashArg> class ListHashSetIterator;
 template<typename ValueArg, size_t inlineCapacity, typename HashArg> class ListHashSetConstIterator;
 
@@ -155,8 +152,6 @@ private:
     iterator makeIterator(Node*);
     const_iterator makeConstIterator(Node*) const;
 
-    friend void deleteAllValues<>(const ListHashSet&);
-
     HashTable<Node*, Node*, IdentityExtractor, NodeHash, NodeTraits, NodeTraits> m_impl;
     Node* m_head;
     Node* m_tail;
@@ -800,19 +795,6 @@ inline auto ListHashSet<T, inlineCapacity, U>::makeConstIterator(Node* position)
     return const_iterator(this, position);
 }
 
-template<bool, typename ValueType, typename HashTableType>
-void deleteAllValues(HashTableType& collection)
-{
-    for (auto it = collection.begin(), end = collection.end(); it != end; ++it)
-        delete (*it)->m_value;
-}
-
-template<typename T, size_t inlineCapacity, typename U>
-inline void deleteAllValues(const ListHashSet<T, inlineCapacity, U>& collection)
-{
-    deleteAllValues<true, typename ListHashSet<T, inlineCapacity, U>::ValueType>(collection.m_impl);
-}
-
 } // namespace WTF
 
 using WTF::ListHashSet;
index df43cfa..af3b301 100644 (file)
@@ -1168,7 +1168,7 @@ inline void Vector<T, inlineCapacity, OverflowHandler>::checkConsistency()
 }
 
 template<typename T, size_t inlineCapacity, typename OverflowHandler>
-void deleteAllValues(const Vector<T, inlineCapacity, OverflowHandler>& collection)
+void deprecatedDeleteAllValues(const Vector<T, inlineCapacity, OverflowHandler>& collection)
 {
     typedef typename Vector<T, inlineCapacity, OverflowHandler>::const_iterator iterator;
     iterator end = collection.end();
index 03e505e..8813fd3 100644 (file)
@@ -1,3 +1,18 @@
+2013-10-13  Darin Adler  <darin@apple.com>
+
+        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.
+
+        * 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.
+
 2013-10-13  Sam Weinig  <sam@webkit.org>
 
         Merge NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS
index e45e3b8..255d97d 100644 (file)
@@ -200,7 +200,7 @@ void CookieMap::updateOldestCookie()
 
 void CookieMap::deleteAllCookiesAndDomains()
 {
-    deleteAllValues(m_subdomains);
+    deprecatedDeleteAllValues(m_subdomains);
     m_subdomains.clear();
     m_cookieVector.clear();
 
index 2421e38..8cefa91 100644 (file)
@@ -77,7 +77,7 @@ RSSFeed::~RSSFeed()
 
 void RSSFeed::clear()
 {
-    deleteAllValues(m_items);
+    deprecatedDeleteAllValues(m_items);
     m_items.clear();
 }
 
index 4eee4b9..4626289 100644 (file)
@@ -184,7 +184,7 @@ WCDataObject::~WCDataObject()
         ReleaseStgMedium(m_medium[i]);
         delete m_medium[i];
     }
-    WTF::deleteAllValues(m_formats);
+    WTF::deprecatedDeleteAllValues(m_formats);
 }
 
 STDMETHODIMP WCDataObject::QueryInterface(REFIID riid,void** ppvObject)
index 0cdb6da..225ac82 100644 (file)
@@ -1,3 +1,14 @@
+2013-10-13  Darin Adler  <darin@apple.com>
+
+        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.
+
+        * WebKitSupport/InPageSearchManager.cpp:
+        (BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
+        Renamed deleteAllValues to deprecatedDeleteAllValues.
+
 2013-10-12  Darin Adler  <darin@apple.com>
 
         Get rid of the toHTMLElement helper for casting FormAssociatedElement to HTMLElement
index 14a1da8..9beba1d 100644 (file)
@@ -389,7 +389,7 @@ void InPageSearchManager::callScopeStringMatches(DeferredScopeStringMatches* cal
 
 void InPageSearchManager::cancelPendingScopingEffort()
 {
-    deleteAllValues(m_deferredScopingWork);
+    deprecatedDeleteAllValues(m_deferredScopingWork);
     m_deferredScopingWork.clear();
 }
 
index 4ad1382..2729d39 100644 (file)
@@ -1 +1,12 @@
+2013-10-13  Darin Adler  <darin@apple.com>
+
+        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.
+
+        * Shared/Plugins/NPRemoteObjectMap.cpp:
+        (WebKit::NPRemoteObjectMap::pluginDestroyed): Renamed deleteAllValues to
+        deprecatedDeleteAllValues.
+
 == Rolled over to ChangeLog-2013-10-13 ==
index 75a5e73..20b5ba0 100644 (file)
@@ -206,7 +206,7 @@ void NPRemoteObjectMap::pluginDestroyed(Plugin* plugin)
     }
 
     // Now delete all the receivers.
-    deleteAllValues(messageReceivers);
+    deprecatedDeleteAllValues(messageReceivers);
 
     Vector<NPObjectProxy*> objectProxies;
     for (HashSet<NPObjectProxy*>::const_iterator it = m_npObjectProxies.begin(), end = m_npObjectProxies.end(); it != end; ++it) {
index da85c4d..e7ada29 100644 (file)
@@ -1,3 +1,19 @@
+2013-10-13  Darin Adler  <darin@apple.com>
+
+        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.
+
+        * 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.
+
 2013-10-13  Alexey Proskuryakov  <ap@apple.com>
 
         build.webkit.org/dashboard incorrectly shows interrupted builds as green
index b350453..afc1a17 100644 (file)
@@ -181,7 +181,7 @@ DRTDataObject::~DRTDataObject()
         ReleaseStgMedium(m_medium[i]);
         delete m_medium[i];
     }
-    WTF::deleteAllValues(m_formats);
+    WTF::deprecatedDeleteAllValues(m_formats);
 }
 
 STDMETHODIMP DRTDataObject::QueryInterface(REFIID riid, void** ppvObject)
index c757488..9ec767e 100644 (file)
@@ -72,10 +72,10 @@ private:
 
 class DRTUndoStack {
 public:
-    ~DRTUndoStack() { deleteAllValues(m_undoVector); }
+    ~DRTUndoStack() { deprecatedDeleteAllValues(m_undoVector); }
 
     bool isEmpty() const { return m_undoVector.isEmpty(); }
-    void clear() { deleteAllValues(m_undoVector); m_undoVector.clear(); }
+    void clear() { deprecatedDeleteAllValues(m_undoVector); m_undoVector.clear(); }
 
     void push(DRTUndoObject* undoObject) { m_undoVector.append(undoObject); }
     DRTUndoObject* pop() { DRTUndoObject* top = m_undoVector.last(); m_undoVector.removeLast(); return top; }
index ab5522f..e7d307b 100755 (executable)
@@ -70,6 +70,7 @@ my %directoriesToIgnore = map { $_ => 1 } @directoriesToIgnoreList;
 
 my @paths;
 find(\&wanted, "Source/JavaScriptCore");
+find(\&wanted, "Source/WTF");
 find(\&wanted, "Source/WebCore");
 find(\&wanted, "Source/WebKit");
 find(\&wanted, "Source/WebKit2");
@@ -97,16 +98,14 @@ sub wanted
 my $isDOMTypeRename = 0;
 my %renames = (
     # Renames go here in the form of:
-    "WKURL" => "WKURL",
-    "KURL" => "URL",
-    "KURLCFNet" => "URLCF",
-    "KURLHash" => "URLHash",
-    "KURLMac" => "URLMac",
-    "KURL_h" => "URL_h",
+    "deleteAllValues" => "deprecatedDeleteAllValues",
 );
 
 my %renamesContemplatedForTheFuture = (
     "HTMLPlugInImageElement" => "HTMLEmbeddedObjectElement",
+    "isPlugInImageElement" => "isEmbeddedObjectElement",
+    "isHTMLPlugInImageElement" => "isHTMLEmbeddedObjectElement",
+    "toHTMLPlugInImageElement" => "toHTMLEmbeddedObjectElement",
 
     "DOMObject" => "JSDOMObject",