Commit 38fa6f9c authored by Alex Moshchuk's avatar Alex Moshchuk Committed by Commit Bot

Add more debugging code to track down RFP duplicate routing ID crashes.

The goal of this CL is to do a DumpWithoutCrashing if we ever send a
proxy creation IPC to the same renderer process more than once.  This
shouldn't ever happen, since even if the proxy becomes non-live after
a process crash and is later recreated, the IPC should go into a newly
respawned renderer process.

Bug: 794625
Change-Id: I6df34d2582645c8c398b9f6b6ce9c87ba772591d
Reviewed-on: https://chromium-review.googlesource.com/1147483Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577653}
parent 17a927eb
......@@ -207,7 +207,9 @@ bool RenderFrameProxyHost::InitRenderFrameProxy() {
// Temporary debugging code for https://crbug.com/794625 to see if we're ever
// sending a message to create a RenderFrameProxy when one already exists.
// TODO(alexmos): Remove after the investigation.
if (render_frame_proxy_created_) {
if (GetProcess()->GetProcess().IsValid() &&
GetProcess()->GetProcess().Pid() ==
pid_of_last_create_message_for_debugging_) {
SiteInstanceImpl* site_instance =
static_cast<SiteInstanceImpl*>(site_instance_.get());
GURL site_url(site_instance->GetSiteURL());
......@@ -235,7 +237,7 @@ bool RenderFrameProxyHost::InitRenderFrameProxy() {
frame_tree_node_->current_replication_state(),
frame_tree_node_->devtools_frame_token());
render_frame_proxy_created_ = true;
set_render_frame_proxy_created(true);
// For subframes, initialize the proxy's FrameOwnerProperties only if they
// differ from default values.
......
......@@ -139,6 +139,12 @@ class RenderFrameProxyHost
void set_render_frame_proxy_created(bool created) {
render_frame_proxy_created_ = created;
// TODO(alexmos): Temporary instrumentation code; remove after
// investigating https://crbug.com/794625.
if (created && GetProcess()->GetProcess().IsValid()) {
pid_of_last_create_message_for_debugging_ =
GetProcess()->GetProcess().Pid();
}
}
// Returns if the RenderFrameProxy for this host is alive.
......@@ -176,6 +182,10 @@ class RenderFrameProxyHost
// True if we have a live RenderFrameProxy for this host.
bool render_frame_proxy_created_;
// TODO(alexmos): Remove after investigating https://crbug.com/794625.
base::ProcessId pid_of_last_create_message_for_debugging_ =
base::kNullProcessId;
// When a RenderFrameHost is in a different process from its parent in the
// frame tree, this class connects its associated RenderWidgetHostView
// to this RenderFrameProxyHost, which corresponds to the same frame in the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment