From 47b498b1d05a5f13e8af8241fb6df9d09a631595 Mon Sep 17 00:00:00 2001 From: Viktor Engelmann Date: Mon, 27 Feb 2017 15:19:51 +0100 Subject: Update HTTP Cache when generating new cookie store Keeping the same Channel ID Service after changing the cookie store leads to segmentation fault on https connections, because chromium tries to reuse resources that have become invalid. Task-number: QTBUG-58650 Change-Id: I90a32ba8e05567b5ba990d2351c6e22324c89835 Reviewed-by: Allan Sandfeld Jensen --- src/core/url_request_context_getter_qt.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core') diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp index bf4661102..0cfde1cf4 100644 --- a/src/core/url_request_context_getter_qt.cpp +++ b/src/core/url_request_context_getter_qt.cpp @@ -268,6 +268,7 @@ void URLRequestContextGetterQt::updateCookieStore() if (m_contextInitialized && !m_updateAllStorage && !m_updateCookieStore) { m_updateCookieStore = true; + m_updateHttpCache = true; content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestContextGetterQt::generateCookieStore, this)); } @@ -337,6 +338,12 @@ void URLRequestContextGetterQt::generateCookieStore() const std::vector cookieableSchemes(kCookieableSchemes, kCookieableSchemes + arraysize(kCookieableSchemes)); cookieMonster->SetCookieableSchemes(cookieableSchemes); m_cookieDelegate->setCookieMonster(cookieMonster); + + if (!m_updateAllStorage) { + Q_ASSERT(m_updateHttpCache); + // HttpCache needs to be regenerated when we generate a new channel id service + generateHttpCache(); + } } void URLRequestContextGetterQt::updateUserAgent() -- cgit v1.2.3