Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3470)

Unified Diff: chrome/browser/ui/tab_contents/tab_contents.cc

Issue 10911008: Avoid generating thumbnails while WebContents is destructed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/tab_contents/tab_contents.cc
diff --git a/chrome/browser/ui/tab_contents/tab_contents.cc b/chrome/browser/ui/tab_contents/tab_contents.cc
index 139648429ba4096c4f1db1027accbc9b0b58ba57..59c83e1b0430e430bcc4b7e88551242e08ca9c66 100644
--- a/chrome/browser/ui/tab_contents/tab_contents.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents.cc
@@ -207,16 +207,6 @@ TabContents::TabContents(WebContents* contents)
TabContents::~TabContents() {
in_destructor_ = true;
- // Need to reset |thumbnail_generator_| here before |web_contents_| is
- // deleted because destructing |web_contents_| can end up causing the
- // thumbnailer to generate a thumbnail. Since TabContents can be
- // destructed during shutdown, trying to generate a thumbnail by sending an
- // IPC message to the GPU process is not safe. Sending
- // chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED can also cause the thumbnailer
mazda 2012/08/30 17:19:18 I was forgetting that we need to deal with this ca
Avi (use Gerrit) 2012/08/30 18:16:26 Note that NOTIFICATION_TAB_CONTENTS_DESTROYED is g
mazda 2012/08/30 19:39:22 That's a great. Then WebContents::IsBeingDestroyed
- // to generate a thumbnail, so this must be placed before sending the
- // notification.
- thumbnail_generator_.reset();
-
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_CONTENTS_DESTROYED,
content::Source<TabContents>(this),

Powered by Google App Engine
This is Rietveld 408576698