summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/thumbnails/thumbnail_tab_helper.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.cc b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
index 2e3d47a..17f68f1 100644
--- a/chrome/browser/thumbnails/thumbnail_tab_helper.cc
+++ b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
@@ -66,10 +66,13 @@ void ProcessCapturedBitmap(scoped_refptr<ThumbnailingContext> context,
scoped_refptr<ThumbnailingAlgorithm> algorithm,
bool succeeded,
const SkBitmap& bitmap) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
if (!succeeded)
return;
+ // On success, we must be on the UI thread (on failure because of shutdown we
+ // are not on the UI thread).
+ DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+
algorithm->ProcessBitmap(context, base::Bind(&UpdateThumbnail), bitmap);
}