Use more references in HistoryItem instead of pointers.
Created attachment 245818 [details] Patch
Attachment 245818 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 245819 [details] Patch
Attachment 245819 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 245820 [details] Patch
Attachment 245820 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 245821 [details] Patch
Attachment 245821 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 245822 [details] Patch
Attachment 245822 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 25 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 245823 [details] Patch
Attachment 245823 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 25 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 245825 [details] Patch
Attachment 245825 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 25 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 245825 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245825&action=review r=me > Source/WebCore/history/BackForwardList.cpp:68 > - RefPtr<HistoryItem> item = m_entries.last(); > + auto& item = m_entries.last(); > m_entries.removeLast(); I'm a little iffy about using auto& in cases like this. Since 'item' may now be taking over the ownership of the HistoryItem, I'd prefer that we make that explicit in the code. Maybe I'm overly paranoid, but I'm also imagining a future where we'd do some kind of PeekType optimization for Vector and allow first(), last(), etc for Vector<RefPtr<T>> to just return T*. > Source/WebCore/history/BackForwardList.cpp:-80 > + auto& item = m_entries.first(); > m_entries.remove(0); > - m_entryHash.remove(item); Same comment. > Source/WebCore/history/BackForwardList.cpp:174 > - while (size < (int)m_entries.size()) { > - RefPtr<HistoryItem> item = m_entries.last(); > + while (size < static_cast<int>(m_entries.size())) { > + auto& item = m_entries.last(); Same comment. > Source/WebCore/history/BackForwardList.h:39 > -typedef Vector<RefPtr<HistoryItem>> HistoryItemVector; > +typedef Vector<Ref<HistoryItem>> HistoryItemVector; Nice :) Do you think we really need this typedef though?
Created attachment 245843 [details] Patch
Attachment 245843 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 25 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 245848 [details] Patch
Attachment 245848 [details] did not pass style-queue: ERROR: Source/WebCore/history/HistoryItem.cpp:478: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/history/HistoryItem.cpp:498: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 2 in 26 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 245848 [details] Patch Clearing flags on attachment: 245848 Committed r179472: <http://trac.webkit.org/changeset/179472>
All reviewed patches have been landed. Closing bug.