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..ee8893fcd145edccef363151568395fbb1712353 100644 |
--- a/content/browser/frame_host/navigation_request.cc |
+++ b/content/browser/frame_host/navigation_request.cc |
@@ -572,6 +572,16 @@ 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. |
+ if (!render_frame_host->CanCommitURL(common_params_.url)) { |
+ // TODO(alexmos, mkwst, arthursonzogni): 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); |
+ } |
+ |
NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL(render_frame_host, |
common_params_.url); |