summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 16:31:04 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 16:31:04 +0000
commit11149bd45e6450e6d3a872d7b30a2b155dbded52 (patch)
tree7ac311f771b4bd4ac74c0cadab347b667ca5f6bb /chrome/browser/renderer_host
parentcacfbedda3a978d116edd0a60c4ae25836a4a812 (diff)
downloadchromium_src-11149bd45e6450e6d3a872d7b30a2b155dbded52.zip
chromium_src-11149bd45e6450e6d3a872d7b30a2b155dbded52.tar.gz
chromium_src-11149bd45e6450e6d3a872d7b30a2b155dbded52.tar.bz2
UseAlternateResourceHandler should set the non-owning pointer
to the CrossSiteResourceHandler in the extra request info to NULL when it deletes the original ResourceHandler chain. R=brettw,jschuh BUG=46126 TEST=See bug report. Review URL: http://codereview.chromium.org/2787005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index adaea34..3943896 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -304,7 +304,6 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id,
// Check if this is an X.509 certificate, if yes, let it be handled
// by X509UserCertResourceHandler.
if (mime_type == "application/x-x509-user-cert") {
-
// This is entirely similar to how DownloadThrottlingResourceHandler
// works except we are doing it for an X.509 client certificates.
@@ -457,6 +456,11 @@ void BufferedResourceHandler::UseAlternateResourceHandler(
URLRequestStatus status(URLRequestStatus::HANDLED_EXTERNALLY, 0);
real_handler_->OnResponseCompleted(info->request_id(), status, std::string());
+ // Remove the non-owning pointer to the CrossSiteResourceHandler, if any,
+ // from the extra request info because the CrossSiteResourceHandler (part of
+ // the original ResourceHandler chain) will be deleted by the next statement.
+ info->set_cross_site_handler(NULL);
+
// This is handled entirely within the new ResourceHandler, so just reset the
// original ResourceHandler.
real_handler_ = handler;