summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 18:16:36 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 18:16:36 +0000
commit22c0b1f2c6a37b0c233c60ee2d89976d7325b3da (patch)
tree0f6e7f9d874490471df6a48b638368e507328c50 /chrome/browser/renderer_host
parent70eb8ed90fcea370e567666632ee225d95caee0b (diff)
downloadchromium_src-22c0b1f2c6a37b0c233c60ee2d89976d7325b3da.zip
chromium_src-22c0b1f2c6a37b0c233c60ee2d89976d7325b3da.tar.gz
chromium_src-22c0b1f2c6a37b0c233c60ee2d89976d7325b3da.tar.bz2
Silently discard invalid OnFollowDeferredRedirect requests sent by the renderer to the browser.
It is a bug if the renderer sends these, but this check prevents the browser from crashing as a consequence of it. One situation where this can happen today (and needs to be fixed renderer-side), is when the renderer cancel's a request in response to IGNORE policy, but then later tries to follow the redirect on the cancelled request. BUG=20470 Review URL: http://codereview.chromium.org/2793001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 6223f5a..6d3b986 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -711,7 +711,7 @@ void ResourceDispatcherHost::FollowDeferredRedirect(
const GURL& new_first_party_for_cookies) {
PendingRequestList::iterator i = pending_requests_.find(
GlobalRequestID(child_id, request_id));
- if (i == pending_requests_.end()) {
+ if (i == pending_requests_.end() || !i->second->status().is_success()) {
DLOG(WARNING) << "FollowDeferredRedirect for invalid request";
return;
}