From 0f8288f93ff2a132b07a4aea369b79b97045b437 Mon Sep 17 00:00:00 2001 From: "gspencer@chromium.org" Date: Thu, 27 Jan 2011 18:37:51 +0000 Subject: This fixes a problem with the aw snap page that I introduced where if you run "about:kill" or kill a page first, and then run "about:crash" in the same window, then it shows the killed page instead of the crashed page, and vice-versa. BUG=none TEST=tried "about:kill", then "about:crash", and then "about:kill" again in the same session, and vice versa. Review URL: http://codereview.chromium.org/6347015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72842 0039d316-1c4b-4281-b951-d872f2087c98 --- .../ui/views/tab_contents/tab_contents_view_gtk.cc | 16 +++++++--------- .../ui/views/tab_contents/tab_contents_view_win.cc | 16 +++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc index c65198a..7aa9d1e 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc +++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc @@ -398,15 +398,13 @@ void TabContentsViewGtk::OnSizeAllocate(GtkWidget* widget, gboolean TabContentsViewGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) { if (tab_contents()->render_view_host() && !tab_contents()->render_view_host()->IsRenderViewLive()) { - if (sad_tab_ == NULL) { - base::TerminationStatus status = - tab_contents()->render_view_host()->render_view_termination_status(); - SadTabView::Kind kind = - status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? - SadTabView::KILLED : SadTabView::CRASHED; - sad_tab_ = new SadTabView(tab_contents(), kind); - SetContentsView(sad_tab_); - } + base::TerminationStatus status = + tab_contents()->render_view_host()->render_view_termination_status(); + SadTabView::Kind kind = + status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? + SadTabView::KILLED : SadTabView::CRASHED; + sad_tab_ = new SadTabView(tab_contents(), kind); + SetContentsView(sad_tab_); gfx::Rect bounds; GetBounds(&bounds, true); sad_tab_->SetBounds(gfx::Rect(0, 0, bounds.width(), bounds.height())); diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc index e5b310f..2da9617 100644 --- a/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc +++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc @@ -403,15 +403,13 @@ LRESULT TabContentsViewWin::OnMouseRange(UINT msg, void TabContentsViewWin::OnPaint(HDC junk_dc) { if (tab_contents()->render_view_host() && !tab_contents()->render_view_host()->IsRenderViewLive()) { - if (sad_tab_ == NULL) { - base::TerminationStatus status = - tab_contents()->render_view_host()->render_view_termination_status(); - SadTabView::Kind kind = - status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? - SadTabView::KILLED : SadTabView::CRASHED; - sad_tab_ = new SadTabView(tab_contents(), kind); - SetContentsView(sad_tab_); - } + base::TerminationStatus status = + tab_contents()->render_view_host()->render_view_termination_status(); + SadTabView::Kind kind = + status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ? + SadTabView::KILLED : SadTabView::CRASHED; + sad_tab_ = new SadTabView(tab_contents(), kind); + SetContentsView(sad_tab_); CRect cr; GetClientRect(&cr); sad_tab_->SetBounds(gfx::Rect(cr)); -- cgit v1.1