| 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 4c24485495582a9779114f52df872e9a33ff8b8c..157cb4d92a690c59af29ca25749de5ff8890677b 100644
|
| --- a/content/browser/frame_host/navigation_request.cc
|
| +++ b/content/browser/frame_host/navigation_request.cc
|
| @@ -446,7 +446,7 @@ void NavigationRequest::OnResponseStarted(
|
|
|
| void NavigationRequest::OnRequestFailed(bool has_stale_copy_in_cache,
|
| int net_error) {
|
| - DCHECK(state_ == STARTED);
|
| + DCHECK(state_ == STARTED || state_ == RESPONSE_STARTED);
|
| state_ = FAILED;
|
| navigation_handle_->set_net_error_code(static_cast<net::Error>(net_error));
|
| frame_tree_node_->navigator()->FailedNavigation(
|
| @@ -467,6 +467,7 @@ void NavigationRequest::OnRequestStarted(base::TimeTicks timestamp) {
|
| void NavigationRequest::OnStartChecksComplete(
|
| NavigationThrottle::ThrottleCheckResult result) {
|
| CHECK(result != NavigationThrottle::DEFER);
|
| + CHECK(result != NavigationThrottle::BLOCK_RESPONSE);
|
|
|
| // Abort the request if needed. This will destroy the NavigationRequest.
|
| if (result == NavigationThrottle::CANCEL_AND_IGNORE ||
|
| @@ -551,6 +552,7 @@ void NavigationRequest::OnStartChecksComplete(
|
| void NavigationRequest::OnRedirectChecksComplete(
|
| NavigationThrottle::ThrottleCheckResult result) {
|
| CHECK(result != NavigationThrottle::DEFER);
|
| + CHECK(result != NavigationThrottle::BLOCK_RESPONSE);
|
|
|
| // Abort the request if needed. This will destroy the NavigationRequest.
|
| if (result == NavigationThrottle::CANCEL_AND_IGNORE ||
|
| @@ -575,6 +577,11 @@ void NavigationRequest::OnWillProcessResponseChecksComplete(
|
| return;
|
| }
|
|
|
| + if (result == NavigationThrottle::BLOCK_RESPONSE) {
|
| + OnRequestFailed(false, net::ERR_BLOCKED_BY_RESPONSE);
|
| + return;
|
| + }
|
| +
|
| // Have the processing of the response resume in the network stack.
|
| loader_->ProceedWithResponse();
|
|
|
|
|