Comment #2 on issue 4749 by [EMAIL PROTECTED]: Crash in ResourceDispatcherHost::RemovePendingRequest on browser shutdown. http://code.google.com/p/chromium/issues/detail?id=4749
I changed that DCHECK to CHECK and confirmed that 'iter' being equal to pending_requests_.end() causes the crash in RemovePendingRequest. I studied the source code carefully but didn't see anything wrong. We construct the 'matching_requests' vector in the first for loop and use it in the second for loop. So by construction we should be able to find matching_requests[i] in pending_requests_. void ResourceDispatcherHost::CancelRequestsForRenderView( int render_process_host_id, int render_view_id) { // Since pending_requests_ is a map, we first build up a list of all of the // matching requests to be cancelled, and then we cancel them. Since there // may be more than one request to cancel, we cannot simply hold onto the map // iterators found in the first loop. // Find the global ID of all matching elements. std::vector<GlobalRequestID> matching_requests; for (PendingRequestList::const_iterator i = pending_requests_.begin(); i != pending_requests_.end(); ++i) { if (i->first.render_process_host_id == render_process_host_id) { ExtraRequestInfo* info = ExtraInfoForRequest(i->second); if (!info->is_download && (render_view_id == -1 || render_view_id == info->render_view_id)) { matching_requests.push_back( GlobalRequestID(render_process_host_id, i->first.request_id)); } } } // Remove matches. for (size_t i = 0; i < matching_requests.size(); ++i) { PendingRequestList::iterator iter = pending_requests_.find(matching_requests[i]); CHECK(iter != pending_requests_.end()); RemovePendingRequest(iter); } } -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-bugs" group. To post to this group, send email to chromium-bugs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/chromium-bugs?hl=en -~----------~----~----~----~------~----~------~--~---