From 89ebafdb6c41229f007d423aa785dea6ace07271 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 28 Nov 2018 17:19:35 +0100 Subject: Shutdown ProxyResolutionSerivce Shut down the ProxyResolutionService before regenerating storage, it may have pending URLRequests. Change-Id: If79efc0bc942762dc48a50a12d74593ff1ee3989 Reviewed-by: Allan Sandfeld Jensen --- src/core/profile_io_data_qt.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/profile_io_data_qt.cpp') diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index 36f92e14f..63585b2c3 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -171,6 +171,8 @@ ProfileIODataQt::~ProfileIODataQt() { if (content::BrowserThread::IsThreadInitialized(content::BrowserThread::IO)) DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + if (m_urlRequestContext && m_urlRequestContext->proxy_resolution_service()) + m_urlRequestContext->proxy_resolution_service()->OnShutdown(); m_resourceContext.reset(); if (m_cookieDelegate) m_cookieDelegate->setCookieMonster(0); // this will let CookieMonsterDelegateQt be deleted @@ -263,6 +265,7 @@ void ProfileIODataQt::generateStorage() // We must stop all requests before deleting their backends. if (m_storage) { + m_urlRequestContext->proxy_resolution_service()->OnShutdown(); m_cookieDelegate->setCookieMonster(nullptr); m_storage->set_cookie_store(nullptr); cancelAllUrlRequests(); -- cgit v1.2.3