diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-01-08 10:12:58 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-01-08 10:47:57 +0100 |
commit | 233258f132134caaa3c4acf924b47d7e548865e7 (patch) | |
tree | 2afbcb2923f13b03fbb1dc15c1c5b3622842ef1e /src/webenginewidgets/api/qwebengineprofile.cpp | |
parent | 6666e23ed6252c3ef53c5f17d4f28bfe63736e33 (diff) | |
parent | 9ef3a8263098c6a32db8b824aabf85587d1f1140 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
src/core/api/qwebengineurlrequestjob.cpp
src/core/browser_context_adapter.cpp
src/core/renderer/user_resource_controller.cpp
src/core/web_engine_context.cpp
src/webenginewidgets/api/qwebenginepage.cpp
Change-Id: I5278e5e22e1776d42975fc94d70ff8ca4f81fb9a
Diffstat (limited to 'src/webenginewidgets/api/qwebengineprofile.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index c4de46b67..5a6c0e18a 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -155,11 +155,18 @@ QWebEngineBrowserContext::QWebEngineBrowserContext(QSharedPointer<QtWebEngineCor QWebEngineBrowserContext::~QWebEngineBrowserContext() { + if (m_profile) + shutdown(); +} + +void QWebEngineBrowserContext::shutdown() +{ Q_ASSERT(m_profile); // In the case the user sets this profile as the parent of the interceptor // it can be deleted before the browser-context still referencing it is. browserContextRef->setRequestInterceptor(nullptr); browserContextRef->removeClient(m_profile); + m_profile = 0; } QWebEngineProfilePrivate::QWebEngineProfilePrivate(QSharedPointer<QtWebEngineCore::BrowserContextAdapter> browserContext) @@ -181,6 +188,8 @@ QWebEngineProfilePrivate::~QWebEngineProfilePrivate() } m_ongoingDownloads.clear(); + if (m_browserContext) + m_browserContext->shutdown(); } QSharedPointer<QtWebEngineCore::BrowserContextAdapter> QWebEngineProfilePrivate::browserContext() const |