summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 20:05:55 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 20:05:55 +0000
commitcf68b0961cb29741f9a90322afef8b7d5d19d0da (patch)
treebfa65557b1eccef23b179e8da1b23520b4531bb0 /chrome
parent5c6df552dbac7a325777ba6f6ff1e739200177a6 (diff)
downloadchromium_src-cf68b0961cb29741f9a90322afef8b7d5d19d0da.zip
chromium_src-cf68b0961cb29741f9a90322afef8b7d5d19d0da.tar.gz
chromium_src-cf68b0961cb29741f9a90322afef8b7d5d19d0da.tar.bz2
Don't show sad tab page for TabContents in browser shutdown.
BUG=28625 TEST=Manual; made sure quitting (on any platform) doesn't cause sad tab to flash on HTML dialogs Review URL: http://codereview.chromium.org/546058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 6b8ef7d..097cb37 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/blocked_popup_container.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/cert_store.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/debugger/devtools_manager.h"
@@ -1969,7 +1970,11 @@ void TabContents::RenderViewGone(RenderViewHost* rvh) {
SetIsCrashed(true);
// Tell the view that we've crashed so it can prepare the sad tab page.
- view_->OnTabCrashed();
+ // Only do this 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)
+ view_->OnTabCrashed();
// Hide any visible hung renderer warning for this web contents' process.
hung_renderer_dialog::HideForTabContents(this);