Add temporary DumpWithoutCrashing to InitRenderFrameProxy().
This should help investigate a theory that a message to create a
RenderFrameProxy is sent when that proxy already exists in the
renderer process.
Bug: 794625
Change-Id: I2bf7dc1312dc3cbf8d307c8358ac64c8402fe875
Reviewed-on: https://chromium-review.googlesource.com/1139186
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575856}
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
index e45a3ca..b06a4b9 100644
--- a/content/browser/frame_host/render_frame_proxy_host.cc
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -8,6 +8,8 @@
#include <vector>
#include "base/callback.h"
+#include "base/debug/alias.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/lazy_instance.h"
#include "content/browser/bad_message.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
@@ -202,6 +204,30 @@
site_instance_.get());
}
+ // 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_) {
+ SiteInstanceImpl* site_instance =
+ static_cast<SiteInstanceImpl*>(site_instance_.get());
+ GURL site_url(site_instance->GetSiteURL());
+ DEBUG_ALIAS_FOR_GURL(site_url_copy, site_url);
+ GURL current_rfh_site_url(frame_tree_node_->render_manager()
+ ->current_frame_host()
+ ->GetSiteInstance()
+ ->GetSiteURL());
+ DEBUG_ALIAS_FOR_GURL(current_rfh_site_url_copy, current_rfh_site_url);
+
+ int routing_id_copy = routing_id_;
+ base::debug::Alias(&routing_id_copy);
+ int parent_routing_id_copy = parent_routing_id;
+ base::debug::Alias(&parent_routing_id_copy);
+ int active_frame_count = site_instance->active_frame_count();
+ base::debug::Alias(&active_frame_count);
+
+ base::debug::DumpWithoutCrashing();
+ }
+
int view_routing_id = frame_tree_node_->frame_tree()
->GetRenderViewHost(site_instance_.get())->GetRoutingID();
GetProcess()->GetRendererInterface()->CreateFrameProxy(