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

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

Issue 2982623002: Revert of Block redirects to renderer-debug urls. (Closed)
Patch Set: Created 3 years, 5 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
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 588f4c55b02bde3026e187d83feab3dac0d48932..26c98282a088a141cf74d017260323133f0dd28d 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -6,6 +6,7 @@
#include <iterator>
+#include "base/debug/dump_without_crashing.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "content/browser/appcache/appcache_navigation_handle.h"
@@ -123,6 +124,7 @@
is_form_submission_(is_form_submission),
expected_render_process_host_id_(ChildProcessHost::kInvalidUniqueID),
weak_factory_(this) {
+ is_in_constructor = true;
TRACE_EVENT_ASYNC_BEGIN2("navigation", "NavigationHandle", this,
"frame_tree_node",
frame_tree_node_->frame_tree_node_id(), "url",
@@ -176,9 +178,15 @@
TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationHandle", this,
"Same document");
}
+ is_in_constructor = false;
}
NavigationHandleImpl::~NavigationHandleImpl() {
+ // TODO(arthursonzogni): Remove this when we understand the root cause behind
+ // crbug.com/704892.
+ if (is_in_constructor)
+ base::debug::DumpWithoutCrashing();
+
// Inform the RenderProcessHost to no longer expect a navigation.
if (expected_render_process_host_id_ != ChildProcessHost::kInvalidUniqueID) {
RenderProcessHost* process =
@@ -645,13 +653,10 @@
"WillRedirectRequest", "url",
new_url.possibly_invalid_spec());
- // |new_url| is not expected to be a "renderer debug" url. It should be
- // blocked in NavigationRequest::OnRequestRedirected or in
- // ResourceLoader::OnReceivedRedirect. If it is not the case,
- // DidFinishNavigation will not be called. It could confuse some
- // WebContentsObserver because DidStartNavigation was called.
- // See https://crbug.com/728398.
- CHECK(!IsRendererDebugURL(new_url));
+ // TODO(arthursonzogni): Remove this when we understand the root cause behind
+ // crbug.com/704892 and crbug.com/736658
+ if (IsRendererDebugURL(new_url))
+ base::debug::DumpWithoutCrashing();
// Update the navigation parameters.
url_ = new_url;
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/browser/frame_host/navigation_handle_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698