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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1613453002: Diagnose RenderFrameImpl::didCommitProvisionalLoad crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Limit SwapOut keys to main frame 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 41daf307a3cf84ae2fd2c504e9845f93a172996f..16399063641b1a24a3e314bbd30f061c8c633669 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -13,6 +13,7 @@
#include "base/command_line.h"
#include "base/debug/alias.h"
#include "base/debug/asan_invalid_access.h"
+#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/files/file.h"
#include "base/i18n/char_iterator.h"
@@ -1531,6 +1532,7 @@ void RenderFrameImpl::OnSwapOut(
RenderViewImpl* render_view = render_view_.get();
bool is_main_frame = is_main_frame_;
+ int routing_id = GetRoutingID();
// Now that all of the cleanup is complete and the browser side is notified,
// start using the RenderFrameProxy, if one is created.
@@ -1546,8 +1548,15 @@ void RenderFrameImpl::OnSwapOut(
// For main frames, the swap should have cleared the RenderView's pointer to
// this frame.
- if (is_main_frame)
+ if (is_main_frame) {
+ base::debug::SetCrashKeyValue("swapout_frame_id",
+ base::IntToString(routing_id));
+ base::debug::SetCrashKeyValue("swapout_proxy_id",
+ base::IntToString(proxy->routing_id()));
+ base::debug::SetCrashKeyValue(
+ "swapout_view_id", base::IntToString(render_view->GetRoutingID()));
CHECK(!render_view->main_render_frame_);
+ }
if (is_loading)
proxy->OnDidStartLoading();
@@ -3106,6 +3115,19 @@ void RenderFrameImpl::didCommitProvisionalLoad(
// it needs to set RenderViewImpl's pointer for the main frame to itself
// and ensure RenderWidget is no longer in swapped out mode.
if (is_main_frame_) {
+ // Debug cases of https://crbug.com/575245.
+ base::debug::SetCrashKeyValue("commit_frame_id",
+ base::IntToString(GetRoutingID()));
+ base::debug::SetCrashKeyValue("commit_proxy_id",
+ base::IntToString(proxy->routing_id()));
nasko 2016/01/20 21:03:11 Wouldn't |proxy| be deleted by now? The swap() cal
Charlie Reis 2016/01/20 21:16:46 You're right! It's garbage here. Good catch.
+ base::debug::SetCrashKeyValue(
+ "commit_view_id", base::IntToString(render_view_->GetRoutingID()));
+ if (render_view_->main_render_frame_) {
+ base::debug::SetCrashKeyValue(
+ "commit_main_render_frame_id",
+ base::IntToString(
+ render_view_->main_render_frame_->GetRoutingID()));
+ }
CHECK(!render_view_->main_render_frame_);
render_view_->main_render_frame_ = this;
if (render_view_->is_swapped_out())
« no previous file with comments | « chrome/common/crash_keys.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698