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 9c7c76531f39dbe8068e2a383acebdbcd930d5df..5693e5a36575f3eb5e0f3f1192bb7ab820def609 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -900,6 +900,17 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( |
| if (!IsBrowserSideNavigationEnabled() && navigation_handle_) { |
| navigation_handle_->set_net_error_code( |
| static_cast<net::Error>(params.error_code)); |
| + } else { |
| + // The renderer should not be sending this message unless asked to commit |
| + // an error page. |
| + // TODO(clamy): Stop sending DidFailProvisionalLoad IPCs at all when enough |
| + // observers have moved to DidFinishNavigation. |
| + if (!navigation_handle_ || |
| + navigation_handle_->GetNetErrorCode() == net::OK) { |
| + bad_message::ReceivedBadMessage( |
| + GetProcess(), bad_message::RFH_UNEXPECTED_FAIL_PROVISIONAL_LOAD); |
|
Charlie Reis
2016/04/11 21:10:57
The conditions surrounding this will make it hard
clamy
2016/04/12 14:08:01
Done. It was actually hard enough to read that I t
|
| + return; |
| + } |
| } |
| frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); |
| } |