summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 20:10:19 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 20:10:19 +0000
commitde0bfc41fde5e7387154820e3fdfe58ffd734831 (patch)
treeee9b38de2976612dd0853be75a92e4623f1b284c
parent8d032fa76e14d9fdabc2109039121689220908b7 (diff)
downloadchromium_src-de0bfc41fde5e7387154820e3fdfe58ffd734831.zip
chromium_src-de0bfc41fde5e7387154820e3fdfe58ffd734831.tar.gz
chromium_src-de0bfc41fde5e7387154820e3fdfe58ffd734831.tar.bz2
Adds more debugging code in hopes of isolating crash. The latest
debugging code seems to indicate the crash is occuring because between lines 1 and 4 the render view host goes away: 1 CHECK(contents->render_view_host()); 2 gfx::Rect bounds = GetDisplayBounds(contents); 3 window()->SetBounds(bounds, frame_hwnd); 4 CHECK(contents->render_view_host()); I can only think some where in SetBounds we're pumping events and the renderer is going away. I don't think SetBounds should do that though, so I'm confused. We'll see what this round of debugging code indicates. BUG=58853 TEST=none Review URL: http://codereview.chromium.org/6330021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73008 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index a6b610c..cdd08af 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -194,6 +194,9 @@ class HungRendererDialogView : public views::View,
// Whether or not we've created controls for ourself.
bool initialized_;
+ // TODO(sky): remove when figure out cause of 58853.
+ bool preparing_to_show_;
+
// An amusing icon image.
static SkBitmap* frozen_icon_;
@@ -221,7 +224,8 @@ HungRendererDialogView::HungRendererDialogView()
kill_button_(NULL),
kill_button_container_(NULL),
contents_(NULL),
- initialized_(false) {
+ initialized_(false),
+ preparing_to_show_(false) {
InitClass();
}
@@ -248,10 +252,16 @@ void HungRendererDialogView::ShowForTabContents(TabContents* contents) {
if (!window()->IsActive()) {
// TODO(sky): remove when figure out cause of 58853.
CHECK(contents->render_view_host());
+ volatile TabContents* passed_c = contents;
+ volatile TabContents* this_contents = contents_;
+ preparing_to_show_ = true;
gfx::Rect bounds = GetDisplayBounds(contents);
window()->SetBounds(bounds, frame_hwnd);
+ preparing_to_show_ = false;
+ CHECK(contents->render_view_host());
+
// We only do this if the window isn't active (i.e. hasn't been shown yet,
// or is currently shown but deactivated for another TabContents). This is
// because this window is a singleton, and it's possible another active
@@ -267,6 +277,8 @@ void HungRendererDialogView::EndForTabContents(TabContents* contents) {
DCHECK(contents);
if (contents_ && contents_->GetRenderProcessHost() ==
contents->GetRenderProcessHost()) {
+ // TODO(sky): remove when figure out cause of 58853.
+ CHECK(!preparing_to_show_);
window()->Close();
// Since we're closing, we no longer need this TabContents.
contents_ = NULL;