diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-23 09:39:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-23 12:13:42 +0000 |
commit | 12c00caa3d017116ba29801578f1bd42b111824a (patch) | |
tree | d7d6fe7e3616ae36de747b9b2c40837ed7490828 /configmgr | |
parent | e176e7a5eafa11df9ad5a9948724a4b6102798d0 (diff) |
unlock during dispose in configmgr::configuration_provider::Service
Since the code that can run during flushModifications might manage to
call back into Service..
regression from
commit a61951a3a21c6457334f78f657806c1167dbf339
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Mon Feb 20 20:08:30 2023 +0200
BaseMutex->std::mutex in configmgr::configuration_provider::Service
Change-Id: I0070e7589cdea38905de6c68adefd8081b122152
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147500
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/configurationprovider.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index 215cad7f6f14..a99309397e37 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -106,7 +106,7 @@ private: virtual ~Service() override {} - virtual void disposing(std::unique_lock<std::mutex>& /*rGuard*/) override { flushModifications(); } + virtual void disposing(std::unique_lock<std::mutex>& rGuard) override; virtual OUString SAL_CALL getImplementationName() override { @@ -330,6 +330,12 @@ css::lang::Locale Service::getLocale() { return loc; } +void Service::disposing(std::unique_lock<std::mutex>& rGuard) { + rGuard.unlock(); // just in case we call back into Service during dispose() + flushModifications(); + rGuard.lock(); +} + void Service::flushModifications() const { Components * components; { |