diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 16:31:04 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 16:31:04 +0000 |
commit | 11149bd45e6450e6d3a872d7b30a2b155dbded52 (patch) | |
tree | 7ac311f771b4bd4ac74c0cadab347b667ca5f6bb /chrome/browser/renderer_host | |
parent | cacfbedda3a978d116edd0a60c4ae25836a4a812 (diff) | |
download | chromium_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.cc | 6 |
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; |