summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,