diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-10 09:31:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-10 11:55:23 +0200 |
commit | c728c9df75344f431817d876b73ec867c7d449f6 (patch) | |
tree | a873eacd54e46b987411d80b831c488eae207d7f /uui | |
parent | cdadd1a0c5d94a1c92ffd431080c60f65d4abe0d (diff) |
Revert "use SolarMutexReleaser in UUIInteractionHelper"
This reverts commit 3705a2904d50210e3515723ad24bbbb6a72eb37f.
which breaks update of extensions.
SolarMutexReleaser requires that we already hold the mutex which is not always true at this spot.
Thanks to Julien Nabert for debugging this.
Change-Id: I6d54d4db63e8694f3dfb9d15d84f47101ded1edc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92007
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 0c9b9397aeeb..f3c7c3b94088 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -164,8 +164,11 @@ UUIInteractionHelper::handleRequest( HandleData aHD(rRequest); Link<void*,void> aLink(&aHD,handlerequest); Application::PostUserEvent(aLink,this); - SolarMutexReleaser aReleaser; + comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex(); + sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0; aHD.wait(); + if (nLockCount) + rSolarMutex.acquire(nLockCount); return aHD.bHandled; } else @@ -212,8 +215,11 @@ UUIInteractionHelper::getStringFromRequest( HandleData aHD(rRequest); Link<void*,void> aLink(&aHD,getstringfromrequest); Application::PostUserEvent(aLink,this); - SolarMutexReleaser aReleaser; + comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex(); + sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0; aHD.wait(); + if (nLockCount) + rSolarMutex.acquire(nLockCount); return aHD.m_aResult; } else |