summaryrefslogtreecommitdiffstats
path: root/net/proxy/init_proxy_resolver.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 23:07:08 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 23:07:08 +0000
commit20d296ddc770d1bdb547bab4485ad7cb8c124085 (patch)
tree176c789a9b7a456c825c41be0d921a43537c2447 /net/proxy/init_proxy_resolver.cc
parent0e64095b374f53899df0a88fefc1e60b062b88de (diff)
downloadchromium_src-20d296ddc770d1bdb547bab4485ad7cb8c124085.zip
chromium_src-20d296ddc770d1bdb547bab4485ad7cb8c124085.tar.gz
chromium_src-20d296ddc770d1bdb547bab4485ad7cb8c124085.tar.bz2
NULL out the ProxyScriptFetcher used by ProxyService when the URLRequestContext it was using for downloads is destroyed.
This avoids the possibility of accessing freed memory when sharing ProxyService amongst request context, and the main context is destroyed first. BUG=25338 Review URL: http://codereview.chromium.org/387065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/init_proxy_resolver.cc')
-rw-r--r--net/proxy/init_proxy_resolver.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/proxy/init_proxy_resolver.cc b/net/proxy/init_proxy_resolver.cc
index a185278..bd8b444 100644
--- a/net/proxy/init_proxy_resolver.cc
+++ b/net/proxy/init_proxy_resolver.cc
@@ -129,6 +129,11 @@ int InitProxyResolver::DoFetchPacScript() {
LOG(INFO) << "Starting fetch of PAC script " << pac_url;
+ if (!proxy_script_fetcher_) {
+ LOG(ERROR) << "Can't download PAC script, because no fetcher specified";
+ return ERR_UNEXPECTED;
+ }
+
return proxy_script_fetcher_->Fetch(pac_url, &pac_bytes_, &io_callback_);
}