summaryrefslogtreecommitdiffstats
path: root/chrome/common/resource_dispatcher.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-22 06:03:42 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-22 06:03:42 +0000
commitd8197cd4b48327d0dbfb829bc434b7fd9997a4f5 (patch)
treef7ca4328b7878e8c0d23bd5a6591dcbb8dc01e41 /chrome/common/resource_dispatcher.cc
parentd7424eb95597971eb17f0858af0ebe1e2a74072c (diff)
downloadchromium_src-d8197cd4b48327d0dbfb829bc434b7fd9997a4f5.zip
chromium_src-d8197cd4b48327d0dbfb829bc434b7fd9997a4f5.tar.gz
chromium_src-d8197cd4b48327d0dbfb829bc434b7fd9997a4f5.tar.bz2
The ResourceDispatcher object does not honor the deferred load flag for a request correctly. If this flag is set it correctly queues up any subsequent responses.
When the flag is reset it starts dispatching these responses. If the deferred flag is set in the context of these responses it continues to dispatch further responses, which is not correct. Fix is to check if the deferred flag for a request is set in the context of a response and stop dispatching if yes. This fixes bug http://code.google.com/p/chromium/issues/detail?id=19931 and could potentially explain this http://code.google.com/p/chromium/issues/detail?id=19393 Bug=19931 Test= Covered by unit test. Review URL: http://codereview.chromium.org/173187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24069 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_dispatcher.cc')
-rw-r--r--chrome/common/resource_dispatcher.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc
index d0a90a5..d951a33 100644
--- a/chrome/common/resource_dispatcher.cc
+++ b/chrome/common/resource_dispatcher.cc
@@ -528,6 +528,12 @@ void ResourceDispatcher::FlushDeferredMessages(int request_id) {
q.pop_front();
DispatchMessage(*m);
delete m;
+ // If this request is deferred in the context of the above message, then we
+ // should honor the same and stop dispatching further messages.
+ if (request_info.is_deferred) {
+ request_info.deferred_message_queue.swap(q);
+ return;
+ }
}
}