summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorgspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 21:55:47 +0000
committergspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-28 21:55:47 +0000
commitf917af9ae7d7a1467720db07cebfacf96750d2c5 (patch)
treea30039de093db97fca670a7b9699b4e98e3e7c0e /chrome/browser/tab_contents
parent5ebb411aedc86b634719c83c646211b9f0c9d5c3 (diff)
downloadchromium_src-f917af9ae7d7a1467720db07cebfacf96750d2c5.zip
chromium_src-f917af9ae7d7a1467720db07cebfacf96750d2c5.tar.gz
chromium_src-f917af9ae7d7a1467720db07cebfacf96750d2c5.tar.bz2
This fixes an InvalidRead error that valgrind found.
TEST=ran valgrind on chromeos version of chrome. BUG=none Review URL: http://codereview.chromium.org/1807006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/thumbnail_generator.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index a3c476c..f9998a4 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -393,7 +393,10 @@ void ThumbnailGenerator::TabContentsDisconnected(TabContents* contents) {
RenderWidgetHost* renderer = contents->render_view_host();
while (iterator != callback_map_.end()) {
if (iterator->second->renderer == renderer) {
- callback_map_.erase(iterator);
+ ThumbnailCallbackMap::iterator nuked = iterator;
+ ++iterator;
+ callback_map_.erase(nuked);
+ continue;
}
++iterator;
}