| Index: net/proxy/proxy_service.cc
|
| diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
|
| index 6dd1b5014ec896abc49a706cb721ce1ae655918f..97b315c92eae22697eecb91b7588f406499f5d0d 100644
|
| --- a/net/proxy/proxy_service.cc
|
| +++ b/net/proxy/proxy_service.cc
|
| @@ -827,6 +827,24 @@ class ProxyService::PacRequest
|
| config_id_ = ProxyConfig::kInvalidConfigID;
|
| config_source_ = PROXY_CONFIG_SOURCE_UNKNOWN;
|
|
|
| + // If the PAC script failed fatally, it needs to be reloaded. Currently,
|
| + // this only applies to out-of-process proxy resolution and only happens
|
| + // when the process crashes.
|
| + if (result_code == ERR_PAC_SCRIPT_TERMINATED) {
|
| + VLOG(1) << "Detected PAC script terminated. Resetting proxy config.";
|
| + // Reset the proxy config.
|
| + // REVIEWERS: Should the fetched proxy config be reset?
|
| + service_->ResetProxyConfig(false);
|
| +
|
| + // If there are any pending requests, excluding this one, re-start the
|
| + // config fetch/apply process.
|
| + size_t pending_requests = service_->NumPendingRequests();
|
| + if (pending_requests > 1 ||
|
| + (pending_requests && !service_->ContainsPendingRequest(this))) {
|
| + service_->ApplyProxyConfigIfAvailable();
|
| + }
|
| + }
|
| +
|
| return rv;
|
| }
|
|
|
| @@ -1326,6 +1344,10 @@ void ProxyService::RemovePendingRequest(PacRequest* req) {
|
| pending_requests_.erase(it);
|
| }
|
|
|
| +size_t ProxyService::NumPendingRequests() const {
|
| + return pending_requests_.size();
|
| +}
|
| +
|
| int ProxyService::DidFinishResolvingProxy(const GURL& url,
|
| int load_flags,
|
| NetworkDelegate* network_delegate,
|
|
|