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

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

Issue 2736863003: Test that no crash happens with the CWS error page.
Patch Set: Prevent crash of the renderer. Created 3 years, 9 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/test/data/extensions/iframe-child-src-none.html ('k') | 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_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index a5a193160646054bdf9751aaf94b7c100b7092ed..d7b171d58b8c52ce075fa819fc05250f4b90bb9a 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -615,7 +615,12 @@ void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache,
// 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));
+ if (!render_frame_host->CanCommitURL(common_params_.url)) {
+ // TODO(arthursonzogni, alexmos): This code should be replaced by
+ // UNREACHED() once the error pages are refactored.
+ // See crbug.com/588314 and crbug.com/622385.
+ common_params_.url = GURL(kUnreachableWebDataURL);
nasko 2017/03/22 17:35:22 This is not something we should do. Charlie, Alex
+ }
NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host,
common_params_.url);
« no previous file with comments | « chrome/test/data/extensions/iframe-child-src-none.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698