Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index e1348926806a53de700ac03507303cbefb966e30..8b22ffa44ae4768eafde3af8f981001311d69690 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -300,6 +300,10 @@ RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance, |
last_navigation_lofi_state_(LOFI_UNSPECIFIED), |
frame_host_binding_(this), |
weak_ptr_factory_(this) { |
+ LOG(ERROR) << "RFH[" << this << "]::RFH: " |
+ << " routing_id:" << routing_id |
+ << " instance:" << site_instance->GetId() << ":" |
+ << site_instance->GetSiteURL(); |
frame_tree_->AddRenderViewHostRef(render_view_host_); |
GetProcess()->AddRoute(routing_id_, this); |
g_routing_id_frame_map.Get().insert(std::make_pair( |
@@ -394,6 +398,8 @@ RenderFrameHostImpl::~RenderFrameHostImpl() { |
// Notify the FrameTree that this RFH is going away, allowing it to shut down |
// the corresponding RenderViewHost if it is no longer needed. |
frame_tree_->ReleaseRenderViewHostRef(render_view_host_); |
+ |
+ LOG(ERROR) << "RFH[" << this << "]::~RFH"; |
} |
int RenderFrameHostImpl::GetRoutingID() { |
@@ -1083,17 +1089,23 @@ void RenderFrameHostImpl::OnDocumentOnLoadCompleted( |
void RenderFrameHostImpl::OnDidStartProvisionalLoad( |
const GURL& url, |
const base::TimeTicks& navigation_start) { |
+ LOG(ERROR) << "RFH[" << this << "]::DidStartProvisionalLoad: " |
+ << " url:" << url.spec().substr(0, 250); |
// TODO(clamy): Check if other navigation methods (OpenURL, |
// DidFailProvisionalLoad, ...) should also be ignored if the RFH is no longer |
// active. |
if (!is_active()) |
return; |
+ |
frame_tree_node_->navigator()->DidStartProvisionalLoad(this, url, |
navigation_start); |
} |
void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( |
const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { |
+ LOG(ERROR) << "RFH[" << this << "]::DidFailProvisionalLoadWithError: " |
+ << " error:" << params.error_code; |
+ |
// TODO(clamy): Kill the renderer with RFH_FAIL_PROVISIONAL_LOAD_NO_HANDLE and |
// return early if navigation_handle_ is null, once we prevent that case from |
// happening in practice. |
@@ -1113,6 +1125,9 @@ void RenderFrameHostImpl::OnDidFailLoadWithError( |
const base::string16& error_description, |
bool was_ignored_by_handler) { |
GURL validated_url(url); |
+ LOG(ERROR) << "RFH[" << this << "]::DidFailLoadWithError: " |
+ << " url:" << url.spec().substr(0, 250) << " error:" << error_code; |
+ |
GetProcess()->FilterURL(false, &validated_url); |
frame_tree_node_->navigator()->DidFailLoadWithError( |
@@ -1134,11 +1149,16 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
Read(&msg, &iter, &validated_params)) { |
bad_message::ReceivedBadMessage( |
process, bad_message::RFH_COMMIT_DESERIALIZATION_FAILED); |
+ LOG(ERROR) << "RFH[" << this << "]::DidCommitProvisionalLoad: " |
+ << " failed to read IPC, killed renderer"; |
return; |
} |
TRACE_EVENT1("navigation", "RenderFrameHostImpl::OnDidCommitProvisionalLoad", |
"url", validated_params.url.possibly_invalid_spec()); |
+ LOG(ERROR) << "RFH[" << this << "]::DidCommitProvisionalLoad: " |
+ << " url:" << validated_params.url.spec().substr(0, 250); |
+ |
// Sanity-check the page transition for frame type. |
DCHECK_EQ(ui::PageTransitionIsMainFrame(validated_params.transition), |
!GetParent()); |
@@ -1367,6 +1387,7 @@ void RenderFrameHostImpl::SwapOut( |
// The trace event may not end properly if the ACK times out. We expect this |
// to be fixed when RenderViewHostImpl::OnSwapOut moves to RenderFrameHost. |
TRACE_EVENT_ASYNC_BEGIN0("navigation", "RenderFrameHostImpl::SwapOut", this); |
+ LOG(ERROR) << "RFH[" << this << "]::SwapOut"; |
// If this RenderFrameHost is already pending deletion, it must have already |
// gone through this, therefore just return. |
@@ -1506,6 +1527,7 @@ bool RenderFrameHostImpl::IsWaitingForUnloadACK() const { |
} |
void RenderFrameHostImpl::OnSwapOutACK() { |
+ LOG(ERROR) << "RFH[" << this << "]::SwapOutACK"; |
OnSwappedOut(); |
} |
@@ -2349,6 +2371,9 @@ void RenderFrameHostImpl::Navigate( |
TRACE_EVENT0("navigation", "RenderFrameHostImpl::Navigate"); |
DCHECK(!IsBrowserSideNavigationEnabled()); |
+ LOG(ERROR) << "RFH[" << this << "]::Navigate: " |
+ << " url:" << common_params.url.spec().substr(0, 250); |
+ |
UpdatePermissionsForNavigation(common_params, request_params); |
// Only send the message if we aren't suspended at the start of a cross-site |
@@ -2398,6 +2423,9 @@ void RenderFrameHostImpl::NavigateToInterstitialURL(const GURL& data_url) { |
void RenderFrameHostImpl::OpenURL(const FrameHostMsg_OpenURL_Params& params, |
SiteInstance* source_site_instance) { |
GURL validated_url(params.url); |
+ |
+ LOG(ERROR) << "RFH[" << this << "]::OpenURL: " |
+ << " url:" << validated_url.spec().substr(0, 250); |
GetProcess()->FilterURL(false, &validated_url); |
TRACE_EVENT1("navigation", "RenderFrameHostImpl::OpenURL", "url", |
@@ -2562,6 +2590,9 @@ void RenderFrameHostImpl::CommitNavigation( |
const CommonNavigationParams& common_params, |
const RequestNavigationParams& request_params, |
bool is_view_source) { |
+ LOG(ERROR) << "RFH[" << this << "]::CommitNavigation: " |
+ << " url:" << common_params.url.spec().substr(0, 250); |
+ |
DCHECK((response && body.get()) || |
common_params.url.SchemeIs(url::kDataScheme) || |
!ShouldMakeNetworkRequestForURL(common_params.url) || |
@@ -2609,6 +2640,9 @@ void RenderFrameHostImpl::FailedNavigation( |
const RequestNavigationParams& request_params, |
bool has_stale_copy_in_cache, |
int error_code) { |
+ LOG(ERROR) << "RFH[" << this << "]::FailedNavigation: " |
+ << " url:" << common_params.url.spec().substr(0, 250); |
+ |
// Update renderer permissions even for failed commits, so that for example |
// the URL bar correctly displays privileged URLs instead of filtering them. |
UpdatePermissionsForNavigation(common_params, request_params); |