summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorgspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 18:37:51 +0000
committergspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 18:37:51 +0000
commit0f8288f93ff2a132b07a4aea369b79b97045b437 (patch)
tree5168916d1c6f36af21ffc241341e3d5765a57120 /chrome
parentefcebf36e26bbde3d2bdd774f65a9a15ba99c36a (diff)
downloadchromium_src-0f8288f93ff2a132b07a4aea369b79b97045b437.zip
chromium_src-0f8288f93ff2a132b07a4aea369b79b97045b437.tar.gz
chromium_src-0f8288f93ff2a132b07a4aea369b79b97045b437.tar.bz2
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
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc16
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc16
2 files changed, 14 insertions, 18 deletions
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));