diff options
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 894e99d..e2d40c6 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -1318,8 +1318,7 @@ void ResourceDispatcherHost::OnReadCompleted(URLRequest* request, bool ResourceDispatcherHost::CompleteRead(URLRequest* request, int* bytes_read) { - DCHECK(request); - if (!request->status().is_success()) { + if (!request || !request->status().is_success()) { NOTREACHED(); return false; } @@ -1329,7 +1328,9 @@ bool ResourceDispatcherHost::CompleteRead(URLRequest* request, bytes_read)) { CancelRequest(info->child_id(), info->request_id(), false); // Our callers assume |request| is valid after we return. - DCHECK(request); + DCHECK(pending_requests_.find( + GlobalRequestID(info->child_id(), info->request_id())) != + pending_requests_.end()); return false; } |