summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-02-18 18:21:04 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-02-18 21:50:27 +0100
commit3ed222f6497cf6b2b54d90a4de80fe2db9130f59 (patch)
tree0ab7b4af39e7e98b4704a38305784ebaf8a0fe6d
parentfb4d5885f3c8d00ae528ddf57b2abaa4aabfbcf3 (diff)
don't use the global mutex for UI stuff
This leads to deadlocks if one thread is using the process factory while holding the SolarMutex and another thread is calling the BackingComp::getTypes method. Change-Id: Ib4750aa1ebbfbf4f8dcd09ec2a218202450f4928 Reviewed-on: https://gerrit.libreoffice.org/49940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sfx2/source/dialog/backingcomp.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 76086dc404c7..8d4ee36b4dd4 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -90,6 +90,8 @@ private:
/** the owner frame of this component. */
css::uno::Reference< css::frame::XFrame > m_xFrame;
+ osl::Mutex m_aTypeProviderMutex;
+
public:
explicit BackingComp();
@@ -235,7 +237,7 @@ css::uno::Sequence< css::uno::Type > SAL_CALL BackingComp::getTypes()
if (!pTypeCollection)
{
/* GLOBAL SAFE { */
- ::osl::MutexGuard aGlobalLock(::osl::Mutex::getGlobalMutex());
+ ::osl::MutexGuard aGlobalLock(m_aTypeProviderMutex);
// Control these pointer again ... it can be, that another instance will be faster then this one!
if (!pTypeCollection)
{