2010-08-24 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2010 18:35:39 +0000 (18:35 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2010 18:35:39 +0000 (18:35 +0000)
        Reviewed by Eric Seidel.

        Deploy adoptPtr in WebCore/history
        https://bugs.webkit.org/show_bug.cgi?id=44502

        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::HistoryItem):
        (WebCore::HistoryItem::addRedirectURL):

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

WebCore/ChangeLog
WebCore/history/HistoryItem.cpp

index 24d9f5e..55b07a4 100644 (file)
@@ -2,6 +2,17 @@
 
         Reviewed by Eric Seidel.
 
+        Deploy adoptPtr in WebCore/history
+        https://bugs.webkit.org/show_bug.cgi?id=44502
+
+        * history/HistoryItem.cpp:
+        (WebCore::HistoryItem::HistoryItem):
+        (WebCore::HistoryItem::addRedirectURL):
+
+2010-08-24  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
         Partial deployment of adoptPtr to WebCore/html
         https://bugs.webkit.org/show_bug.cgi?id=44507
 
index 3409f81..42adcfb 100644 (file)
@@ -150,7 +150,7 @@ inline HistoryItem::HistoryItem(const HistoryItem& item)
         m_children.uncheckedAppend(item.m_children[i]->copy());
 
     if (item.m_redirectURLs)
-        m_redirectURLs.set(new Vector<String>(*item.m_redirectURLs));
+        m_redirectURLs = adoptPtr(new Vector<String>(*item.m_redirectURLs));
 }
 
 PassRefPtr<HistoryItem> HistoryItem::copy() const
@@ -553,7 +553,7 @@ void HistoryItem::mergeAutoCompleteHints(HistoryItem* otherItem)
 void HistoryItem::addRedirectURL(const String& url)
 {
     if (!m_redirectURLs)
-        m_redirectURLs.set(new Vector<String>);
+        m_redirectURLs = adoptPtr(new Vector<String>);
 
     // Our API allows us to store all the URLs in the redirect chain, but for
     // now we only have a use for the final URL.