Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.cc |
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
| index 05bf13973d4ea29511853be2075fda1b88a4e29c..c0af6ad4e00cc10c1ad3e6e516a1941519e0d97f 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -2765,8 +2765,22 @@ void RenderFrameHostImpl::FailedNavigation( |
| // completing an unload handler. |
| ResetWaitingState(); |
| - Send(new FrameMsg_FailedNavigation(routing_id_, common_params, request_params, |
| - has_stale_copy_in_cache, error_code)); |
| + // Don't ask the renderer to commit an URL if the browser will decide to kill |
|
clamy
2017/02/16 13:45:59
nit: s/will decide to kill it if it does/will kill
|
| + // it if it does. |
| + if (!CanCommitURL(common_params.url)) { |
| + // TODO(alexmos, mkwst, arthursonzogni): This code could be replaced by |
| + // UNREACHED() once the error pages are refactored. |
| + // See crbug.com/588314 and crbug.com/622385. |
| + CommonNavigationParams new_common_params; |
|
clamy
2017/02/16 13:45:59
These CommonNavigationParams are badly initialized
arthursonzogni
2017/02/17 09:33:19
I wanted to be sure that any traces of the previou
clamy
2017/02/21 15:32:25
I see. Then we should move this code to Navigation
|
| + new_common_params.url = GURL(kUnreachableWebDataURL); |
| + Send(new FrameMsg_FailedNavigation(routing_id_, new_common_params, |
| + RequestNavigationParams(), false, |
| + error_code)); |
| + } else { |
| + Send(new FrameMsg_FailedNavigation(routing_id_, common_params, |
| + request_params, has_stale_copy_in_cache, |
| + error_code)); |
| + } |
| // An error page is expected to commit, hence why is_loading_ is set to true. |
| is_loading_ = true; |