Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1199313006: Disable support for swapped out RenderFrame(Host) on desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d247d1755bf34d41327850ca5e3385fad6fa247f..844c471b89c4c41b78b09d952130859be2d62b03 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -167,6 +167,13 @@ RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance,
bool is_swapped_out = !!(flags & CREATE_RF_SWAPPED_OUT);
bool hidden = !!(flags & CREATE_RF_HIDDEN);
frame_tree_->AddRenderViewHostRef(render_view_host_);
+
+ LOG(ERROR) << "RFH[" << this << "]::RFH: "
+ << " routing_id:" << routing_id
+ << " swapped:" << is_swapped_out
+ << " hidden:" << hidden
+ << " site:" << site_instance_->GetSiteURL();
+
GetProcess()->AddRoute(routing_id_, this);
g_routing_id_frame_map.Get().insert(std::make_pair(
RenderFrameHostID(GetProcess()->GetID(), routing_id_),
@@ -221,6 +228,7 @@ RenderFrameHostImpl::~RenderFrameHostImpl() {
// Shutdown causes the RenderWidgetHost to delete itself.
render_widget_host_->Shutdown();
}
+ LOG(ERROR) << "RFH[" << this << "]::~RFH";
}
int RenderFrameHostImpl::GetRoutingID() {
@@ -602,6 +610,12 @@ bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id,
TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame");
DCHECK(!IsRenderFrameLive()) << "Creating frame twice";
+ LOG(ERROR) << "RFH[" << this << "]::CreateRenderFrame:"
+ << " routing_id:" << routing_id_
+ << " parent:" << parent_routing_id
+ << " previous_sibling_routing_id:" << previous_sibling_routing_id
+ << " proxy:" << proxy_routing_id;
+
// The process may (if we're sharing a process with another host that already
// initialized it) or may not (we have our own process or the old process
// crashed) have been initialized. Calling Init multiple times will be
@@ -658,6 +672,8 @@ bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id,
}
void RenderFrameHostImpl::SetRenderFrameCreated(bool created) {
+ LOG(ERROR) << "RFH[" << this << "]::SetRFCreated: "
+ << created;
bool was_created = render_frame_created_;
render_frame_created_ = created;
@@ -759,6 +775,8 @@ void RenderFrameHostImpl::OnDocumentOnLoadCompleted(
}
void RenderFrameHostImpl::OnDidStartProvisionalLoadForFrame(const GURL& url) {
+ LOG(ERROR) << "RFH[" << this << "]::DidStartProvLoad:"
+ << " url:" << url;
frame_tree_node_->navigator()->DidStartProvisionalLoad(
this, url);
}
@@ -819,6 +837,9 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
OnBeforeUnloadACK(true, approx_renderer_start_time, base::TimeTicks::Now());
}
+ LOG(ERROR) << "RFH[" << this << "]::DidCommitProvLoad:"
+ << " url:" << validated_params.url;
+
// If we're waiting for an unload ack from this renderer and we receive a
// Navigate message, then the renderer was navigating before it received the
// unload request. It will either respond to the unload request soon or our
@@ -1466,6 +1487,7 @@ void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
}
void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) {
+ LOG(ERROR) << "RFH[" << this << "]::OnDidStartLoading";
// Any main frame load to a new document should reset the load since it will
// replace the current page and any frames.
if (to_different_document && !GetParent())
@@ -1486,13 +1508,14 @@ void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) {
}
void RenderFrameHostImpl::OnDidStopLoading() {
+ LOG(ERROR) << "RFH[" << this << "]::OnDidStopLoading";
// This method should never be called when the frame is not loading.
// Unfortunately, it can happen if a history navigation happens during a
// BeforeUnload or Unload event.
// TODO(fdegans): Change this to a DCHECK after LoadEventProgress has been
// refactored in Blink. See crbug.com/466089
if (!is_loading_) {
- LOG(WARNING) << "OnDidStopLoading was called twice.";
+ LOG(ERROR) << "!!!---!!! OnDidStopLoading was called twice.";
return;
}
@@ -1970,6 +1993,9 @@ void RenderFrameHostImpl::InsertVisualStateCallback(
}
bool RenderFrameHostImpl::IsRenderFrameLive() {
+ LOG(ERROR) << "RFH[" << this << "]::IsRenderFrameLive:"
+ << " render_frame_created_:" << render_frame_created_
+ << " process has connection:" << GetProcess()->HasConnection();
bool is_live = GetProcess()->HasConnection() && render_frame_created_;
// Sanity check: the RenderView should always be live if the RenderFrame is.

Powered by Google App Engine
This is Rietveld 408576698