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

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

Issue 2701523004: Add DumpWithoutCrashing in RendererDidNavigateToExistingPage (Closed)
Patch Set: fix origin conditional' Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 23de865a73e75b4a998768641394ad70a35f4c71..b0726921732ae503457b5659721fa912ad934002 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -39,6 +39,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/debug/alias.h"
#include "base/debug/dump_without_crashing.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
@@ -1209,6 +1210,26 @@ void NavigationControllerImpl::RendererDidNavigateToExistingPage(
// meanwhile and no new page was created. We are stuck at the last committed
// entry.
entry = GetLastCommittedEntry();
+ // TODO(estark): remove this DumpWithoutCrashing after investigating
+ // https://crbug.com/688425.
+ if (entry &&
+ !url::Origin(entry->GetURL())
+ .IsSameOriginWith(url::Origin(params.url))) {
+ std::string debug_info =
+ std::string(is_in_page ? "Is in page, " : "Is not in page, ") +
+ std::string(params.nav_entry_id ? "has nav entry id, "
+ : "does not have nav entry id, ") +
+ std::string(params.did_create_new_entry
+ ? "did create new entry, "
+ : "did not create new entry, ") +
+ std::string(params.should_replace_current_entry
+ ? "should replace current entry "
+ : "should not replace current entry");
+ char debug_buf[200];
+ base::strlcpy(debug_buf, debug_info.c_str(), arraysize(debug_buf));
+ base::debug::Alias(&debug_buf);
+ base::debug::DumpWithoutCrashing();
+ }
} else if (params.nav_entry_id) {
// This is a browser-initiated navigation (back/forward/reload).
entry = GetEntryWithUniqueID(params.nav_entry_id);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698