From c728c9df75344f431817d876b73ec867c7d449f6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 10 Apr 2020 09:31:54 +0200 Subject: 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 Reviewed-by: Noel Grandin --- uui/source/iahndl.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'uui') 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 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 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 -- cgit