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

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

Issue 1656603002: Diagnose renderer-side crash with browser-side stack trace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « chrome/common/crash_keys.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 34aec64822518698a2b381625531c7c279315952..10832d530a99c8bec6407e6c2406ee38a136b484 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -10,6 +10,8 @@
#include <utility>
#include "base/command_line.h"
+#include "base/debug/crash_logging.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/trace_event/trace_event.h"
@@ -1882,8 +1884,34 @@ bool RenderFrameHostManager::InitRenderFrame(
if (existing_proxy) {
proxy_routing_id = existing_proxy->GetRoutingID();
CHECK_NE(proxy_routing_id, MSG_ROUTING_NONE);
- if (!existing_proxy->is_render_frame_proxy_live())
+ if (!existing_proxy->is_render_frame_proxy_live()) {
+ // Calling InitRenderFrameProxy on main frames seems to be causing
+ // https://crbug.com/575245, so track down how this can happen.
+ // TODO(creis): Remove this once we've found the cause.
+ if (SiteIsolationPolicy::IsSwappedOutStateForbidden() &&
+ !frame_tree_node_->parent()) {
+ base::debug::SetCrashKeyValue(
+ "initrf_frame_id",
+ base::IntToString(render_frame_host->GetRoutingID()));
+ base::debug::SetCrashKeyValue("initrf_proxy_id",
+ base::IntToString(proxy_routing_id));
+ base::debug::SetCrashKeyValue(
+ "initrf_view_id",
+ base::IntToString(
+ render_frame_host->render_view_host()->GetRoutingID()));
+ base::debug::SetCrashKeyValue(
+ "initrf_main_frame_id",
+ base::IntToString(render_frame_host->render_view_host()
+ ->main_frame_routing_id()));
+ base::debug::SetCrashKeyValue(
+ "initrf_view_is_live",
+ render_frame_host->render_view_host()->IsRenderViewLive() ? "yes"
+ : "no");
+ base::debug::DumpWithoutCrashing();
+ }
+
existing_proxy->InitRenderFrameProxy();
+ }
}
return delegate_->CreateRenderFrameForRenderManager(
« no previous file with comments | « chrome/common/crash_keys.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698