Commit 65b6e73d authored by mmenke@chromium.org's avatar mmenke@chromium.org

Revert 241291 "Fix a long standing leak on cancellation of rende..."

This caused crashes elsewhere in the loading code.

BUG=27911

> Fix a long standing leak on cancellation of renderer-
> initiated URLRequests.  ResourceDispatcher was not calling
> peer->OnCompletedRequest on cancellation of async requests,
> despite it being expected by WebURLLoaderImpl::Context
> (The only ResourceLoaderBridge::Peer).
> 
> This shouldn't impact externally visible behavior at all,
> other than fixing the leak, because once
> WebURLLoaderImpl::Context::Cancel() is called, it will never
> call back into WebURLLoaderImpl.
> 
> BUG=328092
> 
> Review URL: https://codereview.chromium.org/113893007

TBR=mmenke@chromium.org

Review URL: https://codereview.chromium.org/306483009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272998 0039d316-1c4b-4281-b951-d872f2087c98
parent b8b67081
...@@ -588,8 +588,11 @@ void ResourceDispatcher::CancelPendingRequest(int request_id) { ...@@ -588,8 +588,11 @@ void ResourceDispatcher::CancelPendingRequest(int request_id) {
return; return;
} }
// |request_id| will be removed from |pending_requests_| when SiteIsolationPolicy::OnRequestComplete(request_id);
// OnRequestComplete returns with ERR_ABORTED. PendingRequestInfo& request_info = it->second;
ReleaseResourcesInMessageQueue(&request_info.deferred_message_queue);
pending_requests_.erase(it);
message_sender()->Send(new ResourceHostMsg_CancelRequest(request_id)); message_sender()->Send(new ResourceHostMsg_CancelRequest(request_id));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment