Chromium Code Reviews

Unified Diff: chrome/common/resource_dispatcher.cc

Issue 174499: One more deferred load fix. The ResourceDispatcher on receiving a message che... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/resource_dispatcher.cc
===================================================================
--- chrome/common/resource_dispatcher.cc (revision 24356)
+++ chrome/common/resource_dispatcher.cc (working copy)
@@ -286,8 +286,17 @@
return true;
}
// Make sure any deferred messages are dispatched before we dispatch more.
- if (!request_info.deferred_message_queue.empty())
+ if (!request_info.deferred_message_queue.empty()) {
FlushDeferredMessages(request_id);
+ // The request could have been deferred now. If yes then the current
+ // message has to be queued up. The request_info instance should remain
+ // valid here as there are pending messages for it.
+ DCHECK(pending_requests_.find(request_id) != pending_requests_.end());
+ if (request_info.is_deferred) {
+ request_info.deferred_message_queue.push_back(new IPC::Message(message));
+ return true;
+ }
+ }
DispatchMessage(message);
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine