| Index: chrome/browser/history/top_sites.cc
|
| diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
|
| index 1c6f67f9e1353806ed56411a564ac73384c3d336..efd2f8d117e0beb64794237916b23b9d0570f073 100644
|
| --- a/chrome/browser/history/top_sites.cc
|
| +++ b/chrome/browser/history/top_sites.cc
|
| @@ -605,8 +605,9 @@ bool TopSites::EncodeBitmap(const SkBitmap& bitmap,
|
| return false;
|
| }
|
| // As we're going to cache this data, make sure the vector is only as big as
|
| - // it needs to be.
|
| - (*bytes)->data = data;
|
| + // it needs to be, as JPEGCodec::Encode() over-allocates data.capacity().
|
| + // (In a C++0x future, we can just call shrink_to_fit() in Encode())
|
| + (*bytes)->data() = data;
|
| return true;
|
| }
|
|
|
|
|