Index: content/browser/frame_host/frame_tree.cc |
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc |
index 680766435dbd5e742122d3188d7b2ea56a94e022..65d434fb08ea4ff0fe132316510450ffc415ae93 100644 |
--- a/content/browser/frame_host/frame_tree.cc |
+++ b/content/browser/frame_host/frame_tree.cc |
@@ -299,14 +299,20 @@ RenderViewHostImpl* FrameTree::CreateRenderViewHost(SiteInstance* site_instance, |
hidden)); |
render_view_host_map_[site_instance->GetId()] = rvh; |
+ LOG(ERROR) << "FT[" << this << "]::CreateRenderViewHost: " |
+ << " created " << rvh << " with refcount:" << rvh->ref_count(); |
return rvh; |
} |
RenderViewHostImpl* FrameTree::GetRenderViewHost(SiteInstance* site_instance) { |
RenderViewHostMap::iterator iter = |
render_view_host_map_.find(site_instance->GetId()); |
- if (iter == render_view_host_map_.end()) |
+ if (iter == render_view_host_map_.end()) { |
+ LOG(ERROR) << "FT[" << this << "]::GetRenderViewHost: " |
+ << " could not find RVH for site:" |
+ << site_instance->GetId() << "," << site_instance->GetSiteURL(); |
return nullptr; |
+ } |
return iter->second; |
} |
@@ -318,6 +324,9 @@ void FrameTree::AddRenderViewHostRef(RenderViewHostImpl* render_view_host) { |
CHECK(iter->second == render_view_host); |
iter->second->increment_ref_count(); |
+ LOG(ERROR) << "FT[" << this << "]::AddRenderViewHostRef: " |
+ << iter->second << "|" << iter->second->GetSiteInstance()->GetSiteURL() |
+ << " up to " << iter->second->ref_count(); |
} |
void FrameTree::ReleaseRenderViewHostRef(RenderViewHostImpl* render_view_host) { |
@@ -330,11 +339,17 @@ void FrameTree::ReleaseRenderViewHostRef(RenderViewHostImpl* render_view_host) { |
// using it. |
CHECK_GT(iter->second->ref_count(), 0); |
iter->second->decrement_ref_count(); |
+ LOG(ERROR) << "FT[" << this << "]::ReleaseRenderViewHostRef: " |
+ << iter->second << "|" << iter->second->GetSiteInstance()->GetSiteURL() |
+ << " down to " << iter->second->ref_count(); |
if (iter->second->ref_count() == 0) { |
iter->second->Shutdown(); |
render_view_host_map_.erase(iter); |
} |
} else { |
+ LOG(ERROR) << "FT[" << this << "]::ReleaseRenderViewHostRef: " |
+ << site_instance_id << " not found in map:" << (iter != render_view_host_map_.end()); |
+ |
// The RenderViewHost should be in the list of RenderViewHosts pending |
// shutdown. |
bool render_view_host_found = false; |