summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-09-24 15:21:28 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-09-27 16:21:27 +0000
commit8f6fe913d1e7df4f65b023b5a9670167772869fc (patch)
tree476e8e6c48dcbc0bd744d04c2b903bd0f340bd38 /src/core
parent9787fb89c0c0234366e5d88b2e9194518d2590a3 (diff)
Cleaner shutdown
The print-job manager was trying to recreate a notification service, so destroy it earlier, and at the same time kill the content runner before existing WebEngineContext::destroy() to catch any other late recreations of singletons. Change-Id: Ifaa333386248c3dbc6d4f828c727a0a17d5f5c90 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_engine_context.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 8408ff708..7cd7d485b 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -223,6 +223,11 @@ void WebEngineContext::destroy()
// Flush the UI message loop before quitting.
while (delegate->DoWork()) { }
+#if QT_CONFIG(webengine_printing_and_pdf)
+ // Kill print job manager early as it has a content::NotificationRegistrar
+ m_printJobManager.reset();
+#endif
+
// Delete the global object and thus custom profiles
m_defaultProfileAdapter.reset();
m_globalQObject.reset();
@@ -241,6 +246,10 @@ void WebEngineContext::destroy()
// default BrowserContext might be used by the RenderprocessHostImpl's destructor.
m_browserRunner.reset();
+ // Destroying content-runner will force Chromium at_exit calls to run, and
+ // reap child processes.
+ m_contentRunner.reset();
+
// Drop the false reference.
m_handle->Release();
}