Commit 4dc6aad8 authored by mitz@apple.com's avatar mitz@apple.com

Reviewed by Anders Carlsson.

        - fix an assertion failure in Vector::at() beneath
          WebHistoryItem::dictionaryRepresentation.

        * WebHistoryItem.cpp:
        (WebHistoryItem::dictionaryRepresentation): Give the numbers vector initial
        size. Also reduced the inline capacity of the vector used for weekly visit
        counts to 5, which is the expected maximum size.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 605a9ccf
2009-02-06 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
- fix an assertion failure in Vector::at() beneath
WebHistoryItem::dictionaryRepresentation.
* WebHistoryItem.cpp:
(WebHistoryItem::dictionaryRepresentation): Give the numbers vector initial
size. Also reduced the inline capacity of the vector used for weekly visit
counts to 5, which is the expected maximum size.
2009-02-06 Brent Fulgham <bfulgham@webkit.org>
Build fix.
......
......@@ -248,7 +248,7 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::dictionaryRepresentation(void** dictio
const Vector<int>& dailyVisitCount(m_historyItem->dailyVisitCounts());
if (size_t size = dailyVisitCount.size()) {
Vector<CFNumberRef, 13> numbers;
Vector<CFNumberRef, 13> numbers(size);
for (size_t i = 0; i < size; ++i)
numbers[i] = CFNumberCreate(0, kCFNumberIntType, &dailyVisitCount[i]);
......@@ -263,7 +263,7 @@ HRESULT STDMETHODCALLTYPE WebHistoryItem::dictionaryRepresentation(void** dictio
const Vector<int>& weeklyVisitCount(m_historyItem->weeklyVisitCounts());
if (size_t size = weeklyVisitCount.size()) {
Vector<CFNumberRef, 13> numbers;
Vector<CFNumberRef, 5> numbers(size);
for (size_t i = 0; i < size; ++i)
numbers[i] = CFNumberCreate(0, kCFNumberIntType, &weeklyVisitCount[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment