summaryrefslogtreecommitdiffstats
path: root/src/core/profile_qt.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-02-18 17:30:48 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-02-23 05:07:09 +0000
commit000f301289f9c514e155fb108f609d49769be03f (patch)
tree190cc417f8a477bd072008299c6252f450fb7ab0 /src/core/profile_qt.cpp
parenta00fb61776425ed0f32d4d4052ffb1567f62e6d7 (diff)
Do not flush messages form profile destructor
Flush ui messages in profile adapter instead, otherwise we will refer to already destroyed adapter (which we track by qpointer), if some ui messages are being processed. Note profile adapter owns profile so it should be fine to notify about coming browser context destruction. Pick-to: 5.15 Change-Id: Idaa29a459c984ca73d1f5f9ca61b96c9b4017259 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/profile_qt.cpp')
-rw-r--r--src/core/profile_qt.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp
index dac6658e2..36303605f 100644
--- a/src/core/profile_qt.cpp
+++ b/src/core/profile_qt.cpp
@@ -111,8 +111,6 @@ ProfileQt::~ProfileQt()
{
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
m_prefServiceAdapter.commit();
- content::BrowserContext::NotifyWillBeDestroyed(this);
- WebEngineContext::flushMessages();
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(this);
ShutdownStoragePartitions();
m_profileIOData->shutdownOnUIThread();