Changeset 146899 in webkit
- Timestamp:
- Mar 26, 2013 10:04:52 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r146898 r146899 1 2013-03-26 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 HTTPHeaderMap::copyData() could call uncheckedAppend() 4 https://bugs.webkit.org/show_bug.cgi?id=113279 5 6 Reviewed by Alexey Proskuryakov. 7 8 HTTPHeaderMap::copyData() calls reserveInitialCapacity() on the Vector 9 but then appends items using append() function. Since we already know 10 the capacity is sufficient, it is more efficient to call uncheckedAppend() 11 instead to bypass capacity checks. 12 13 No new tests, no behavior change for layout tests. 14 15 * platform/network/HTTPHeaderMap.cpp: 16 (WebCore::HTTPHeaderMap::copyData): 17 1 18 2013-03-26 Vsevolod Vlasov <vsevik@chromium.org> 2 19 -
trunk/Source/WebCore/platform/network/HTTPHeaderMap.cpp
r130612 r146899 52 52 53 53 HTTPHeaderMap::const_iterator end_it = end(); 54 for (HTTPHeaderMap::const_iterator it = begin(); it != end_it; ++it) {55 data-> append(make_pair(it->key.string().isolatedCopy(), it->value.isolatedCopy()));56 } 54 for (HTTPHeaderMap::const_iterator it = begin(); it != end_it; ++it) 55 data->uncheckedAppend(make_pair(it->key.string().isolatedCopy(), it->value.isolatedCopy())); 56 57 57 return data.release(); 58 58 }
Note: See TracChangeset
for help on using the changeset viewer.