Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 23583039: Convert a bunch of resource IPCs to be control messages. They didn't need to be routed. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_dispatcher_host_impl.cc
===================================================================
--- content/browser/loader/resource_dispatcher_host_impl.cc (revision 221543)
+++ content/browser/loader/resource_dispatcher_host_impl.cc (working copy)
@@ -138,7 +138,6 @@
// Aborts a request before an URLRequest has actually been created.
void AbortRequestBeforeItStarts(ResourceMessageFilter* filter,
IPC::Message* sync_result,
- int route_id,
int request_id) {
if (sync_result) {
SyncLoadResult result;
@@ -148,7 +147,6 @@
} else {
// Tell the renderer that this request was disallowed.
filter->Send(new ResourceMsg_RequestComplete(
- route_id,
request_id,
net::ERR_ABORTED,
false,
@@ -844,6 +842,11 @@
handled = delegate->OnMessageReceived(message, message_was_ok);
}
}
+
+ // There could be race conditions in receiving ACKs after a request is
+ // removed. If the control IPC isn't handled here, an assert will fire in
+ // RenderProcessHostImpl::OnMessageReceived.
+ handled = true;
awong 2013/09/06 17:04:11 If I read this correctly, any ResourceHostMsg will
jam 2013/09/06 17:12:04 right
jam 2013/09/06 17:22:17 btw I've uploaded a new patchset that does this no
awong 2013/09/06 17:37:34 It's consistent now so that bit is better. Howeve
jam 2013/09/06 18:00:20 Given the asynchronous nature of our code base, I
}
if (message.type() == ViewHostMsg_DidLoadResourceFromMemoryCache::ID) {
@@ -929,7 +932,7 @@
if (is_shutdown_ ||
!ShouldServiceRequest(process_type, child_id, request_data,
filter_->file_system_context())) {
- AbortRequestBeforeItStarts(filter_, sync_result, route_id, request_id);
+ AbortRequestBeforeItStarts(filter_, sync_result, request_id);
return;
}
@@ -942,7 +945,7 @@
request_data.url,
request_data.resource_type,
resource_context)) {
- AbortRequestBeforeItStarts(filter_, sync_result, route_id, request_id);
+ AbortRequestBeforeItStarts(filter_, sync_result, request_id);
return;
}
@@ -1041,8 +1044,7 @@
handler.reset(new SyncResourceHandler(
filter_, request, sync_result, this));
} else {
- handler.reset(new AsyncResourceHandler(
- filter_, route_id, request, this));
+ handler.reset(new AsyncResourceHandler(filter_, request, this));
}
// The RedirectToFileResourceHandler depends on being next in the chain.
« no previous file with comments | « content/browser/loader/async_resource_handler.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698