Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(889)

Unified Diff: third_party/WebKit/WebCore/history/HistoryItem.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/WebCore/editing/markup.cpp ('k') | third_party/WebKit/WebCore/html/HTMLTokenizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/history/HistoryItem.cpp
===================================================================
--- third_party/WebKit/WebCore/history/HistoryItem.cpp (revision 9118)
+++ third_party/WebKit/WebCore/history/HistoryItem.cpp (working copy)
@@ -125,7 +125,7 @@
m_formData = item.m_formData->copy();
unsigned size = item.m_subItems.size();
- m_subItems.reserveCapacity(size);
+ m_subItems.reserveInitialCapacity(size);
for (unsigned i = 0; i < size; ++i)
m_subItems.append(item.m_subItems[i]->copy());
@@ -408,7 +408,10 @@
if (!m_redirectURLs)
m_redirectURLs.set(new Vector<String>);
- m_redirectURLs->append(url);
+ // 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.
+ (*m_redirectURLs).resize(1);
+ (*m_redirectURLs)[0] = url;
}
Vector<String>* HistoryItem::redirectURLs() const
« no previous file with comments | « third_party/WebKit/WebCore/editing/markup.cpp ('k') | third_party/WebKit/WebCore/html/HTMLTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698