summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-06 18:00:48 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-06 18:00:48 +0000
commitfb7b79f7f656df207b60ee0d6cf8df16e682e95c (patch)
treea6c9110bb7be42d95fd6f1da8089593144161212 /chrome
parent2ff8afa71ab7098f8ab2d72a33cd9a21a6c7a4e1 (diff)
downloadchromium_src-fb7b79f7f656df207b60ee0d6cf8df16e682e95c.zip
chromium_src-fb7b79f7f656df207b60ee0d6cf8df16e682e95c.tar.gz
chromium_src-fb7b79f7f656df207b60ee0d6cf8df16e682e95c.tar.bz2
Poor work-around for the crasher 23411.
Somehow pending_render_view_host_ in RenderViewHostManager is deleted without being NULLed, which I still don't know why. Hoefully the NOTREADED() in there will be hit by somehow and help shed some light on the conditions. BUG=23411 TEST=Make sure navigating across sites and closing tabs and browsers while navigating works as expected. Review URL: http://codereview.chromium.org/378001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31247 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.cc14
-rw-r--r--chrome/browser/tab_contents/render_view_host_manager.h3
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc1
3 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc
index 03e1f3b..52b0813 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.cc
+++ b/chrome/browser/tab_contents/render_view_host_manager.cc
@@ -589,3 +589,17 @@ void RenderViewHostManager::CancelPending() {
pending_dom_ui_.reset();
}
+
+void RenderViewHostManager::RenderViewDeleted(RenderViewHost* rvh) {
+ // We are doing this in order to work around and to track a crasher
+ // (http://crbug.com/23411) where it seems that pending_render_view_host_ is
+ // deleted (not sure from where) but not NULLed.
+ if (rvh == pending_render_view_host_) {
+ // If you hit this NOTREACHED, please report it in the following bug
+ // http://crbug.com/23411 Make sure to include what you were doing when it
+ // happened (navigating to a new page, closing a tab...) and if you can
+ // reproduce.
+ NOTREACHED();
+ pending_render_view_host_ = NULL;
+ }
+}
diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h
index 56da857..3040ac7 100644
--- a/chrome/browser/tab_contents/render_view_host_manager.h
+++ b/chrome/browser/tab_contents/render_view_host_manager.h
@@ -161,6 +161,9 @@ class RenderViewHostManager
int new_request_id);
virtual void OnCrossSiteNavigationCanceled();
+ // Called when a RenderViewHost is about to be deleted.
+ void RenderViewDeleted(RenderViewHost* rvh);
+
private:
friend class TestTabContents;
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 00fd58b..c4651d9 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2030,6 +2030,7 @@ void TabContents::RenderViewDeleted(RenderViewHost* rvh) {
NotificationType::RENDER_VIEW_HOST_DELETED,
Source<TabContents>(this),
Details<RenderViewHost>(rvh));
+ render_manager_.RenderViewDeleted(rvh);
}
void TabContents::DidNavigate(RenderViewHost* rvh,