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

Unified Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 8098017: Make content_shell handle renderers going away. I've made TabContents call TabContentsView::OnTab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/tab_contents/tab_contents_view_mac.mm
===================================================================
--- chrome/browser/tab_contents/tab_contents_view_mac.mm (revision 103561)
+++ chrome/browser/tab_contents/tab_contents_view_mac.mm (working copy)
@@ -8,6 +8,7 @@
#include <string>
+#include "chrome/browser/browser_shutdown.h"
#import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.h"
#include "chrome/browser/tab_contents/popup_menu_helper_mac.h"
#include "chrome/browser/tab_contents/render_view_context_menu_mac.h"
@@ -183,6 +184,12 @@
void TabContentsViewMac::OnTabCrashed(base::TerminationStatus /* status */,
int /* error_code */) {
+ // Only show the sad tab if we're not in browser shutdown, so that TabContents
+ // objects that are not in a browser (e.g., HTML dialogs) and thus are
+ // visible do not flash a sad tab page.
+ if (browser_shutdown::GetShutdownType() != browser_shutdown::NOT_VALID)
+ return;
+
if (!sad_tab_.get()) {
DCHECK(tab_contents_);
if (tab_contents_) {
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_gtk.cc ('k') | chrome/browser/ui/tab_contents/tab_contents_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698