| 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 4e4c97ae48d538e7b08119d120de39de21e31b3a..f885435fe468cdb8326dc9a2d704ff76d196f3b4 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -905,13 +905,10 @@ void RenderFrameHostImpl::OnDidStartProvisionalLoad(
|
|
|
| void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
| const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {
|
| - if (!navigation_handle_) {
|
| - bad_message::ReceivedBadMessage(
|
| - GetProcess(), bad_message::RFH_FAIL_PROVISIONAL_LOAD_NO_HANDLE);
|
| - return;
|
| - }
|
| -
|
| - if (IsBrowserSideNavigationEnabled() &&
|
| + // TODO(clamy): Kill the renderer with RFH_FAIL_PROVISIONAL_LOAD_NO_HANDLE and
|
| + // return early if navigation_handle_ is null, once we prevent that case from
|
| + // happening in practice.
|
| + if (IsBrowserSideNavigationEnabled() && navigation_handle_ &&
|
| navigation_handle_->GetNetErrorCode() == net::OK) {
|
| // The renderer should not be sending this message unless asked to commit
|
| // an error page.
|
| @@ -924,7 +921,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
|
|
| // Update the error code in the NavigationHandle of the navigation.
|
| // PlzNavigate: this has already done in NavigationRequest::OnRequestFailed.
|
| - if (!IsBrowserSideNavigationEnabled()) {
|
| + if (!IsBrowserSideNavigationEnabled() && navigation_handle_) {
|
| navigation_handle_->set_net_error_code(
|
| static_cast<net::Error>(params.error_code));
|
| }
|
|
|