diff options
Diffstat (limited to 'net/socket_stream/socket_stream.cc')
-rw-r--r-- | net/socket_stream/socket_stream.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc index 333e383..d38242c 100644 --- a/net/socket_stream/socket_stream.cc +++ b/net/socket_stream/socket_stream.cc @@ -72,6 +72,7 @@ SocketStream::SocketStream(const GURL& url, Delegate* delegate) SocketStream::~SocketStream() { set_context(NULL); DCHECK(!delegate_); + DCHECK(!pac_request_); } SocketStream::UserData* SocketStream::GetUserData( @@ -92,6 +93,11 @@ void SocketStream::set_context(URLRequestContext* context) { context_ = context; if (prev_context != context) { + if (prev_context && pac_request_) { + prev_context->proxy_service()->CancelPacRequest(pac_request_); + pac_request_ = NULL; + } + net_log_.EndEvent(NetLog::TYPE_REQUEST_ALIVE, NULL); net_log_ = BoundNetLog(); |