summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.cc11
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.h2
2 files changed, 2 insertions, 11 deletions
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index cb7345b..68e8809 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -1283,7 +1283,8 @@ void ResourceDispatcherHost::RemovePendingRequest(
// Delete lazily as this will also delete |info|, triggering the
// ResourceHandler::OnRequestClosed notification. This way we avoid
// re-entering a ResourceHandler that is calling CancelRequest.
- DeleteRequestSoon(iter->second);
+ iter->second->set_delegate(NULL);
+ MessageLoop::current()->DeleteSoon(FROM_HERE, iter->second);
pending_requests_.erase(iter);
@@ -1717,14 +1718,6 @@ void ResourceDispatcherHost::ResumeRequest(const GlobalRequestID& request_id) {
}
}
-void ResourceDispatcherHost::DeleteRequestSoon(net::URLRequest* request) {
- // Drop external references as these may be deleted before the request.
- request->set_delegate(NULL);
- request->set_context(NULL);
-
- MessageLoop::current()->DeleteSoon(FROM_HERE, request);
-}
-
void ResourceDispatcherHost::StartReading(net::URLRequest* request) {
// Start reading.
int bytes_read = 0;
diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h
index 6ed8069..56bd015 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.h
+++ b/content/browser/renderer_host/resource_dispatcher_host.h
@@ -303,8 +303,6 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate {
// Resumes the given request by calling OnResponseStarted or OnReadCompleted.
void ResumeRequest(const content::GlobalRequestID& request_id);
- void DeleteRequestSoon(net::URLRequest* request);
-
// Internal function to start reading for the first time.
void StartReading(net::URLRequest* request);