| Index: content/browser/renderer_host/resource_dispatcher_host.cc
|
| diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
|
| index 6d9e9d8d6a058360ae8cd352735747cda8fc88e6..99730b7f4b4d1f844411d9119f891d51e4817623 100644
|
| --- a/content/browser/renderer_host/resource_dispatcher_host.cc
|
| +++ b/content/browser/renderer_host/resource_dispatcher_host.cc
|
| @@ -1185,7 +1185,13 @@ void ResourceDispatcherHost::CancelRequest(int child_id,
|
| DLOG(WARNING) << "Canceling a request that wasn't found";
|
| return;
|
| }
|
| - CancelRequestInternal(i->second, from_renderer);
|
| + net::URLRequest* request = i->second;
|
| + const bool started_before_cancel = request->is_pending();
|
| + CancelRequestInternal(request, from_renderer);
|
| + // If the request isn't in flight, then we won't get asyncronous notification,
|
| + // so we have to signal ourselves to finish this request.
|
| + if (!started_before_cancel)
|
| + OnResponseCompleted(request);
|
| }
|
|
|
| void ResourceDispatcherHost::CancelRequestInternal(net::URLRequest* request,
|
|
|