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

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

Issue 2697713005: DCHECK: Browser asking renderer to commit URLs it is not allowed to. (Closed)
Patch Set: git cl try 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 | content/browser/frame_host/render_frame_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/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index b39ba868e73a97a9a2ddd0e5c15abe4e43577d8b..63e138db256849c0ef110b65b3e6dfe03d665780 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -572,6 +572,11 @@ void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache,
// Select an appropriate renderer to show the error page.
RenderFrameHostImpl* render_frame_host =
frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this);
+
+ // Don't ask the renderer to commit an URL if the browser will kill it when
+ // it does.
+ DCHECK(render_frame_host->CanCommitURL(common_params_.url));
+
NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host,
common_params_.url);
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698