[Libreoffice-commits] core.git: uui/source

Jan-Marek Glogowski glogow at fbihome.de
Wed Feb 14 16:34:51 UTC 2018


 uui/source/iahndl.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 0e04523b040785e2ce552143d20adcbb40b61d42
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Feb 14 12:30:47 2018 +0100

    tdf#114676 release the SolarMutex, if we own it
    
    This is a follow up on the SolarMutex unification. Quite probably
    the updater process, which is now aborting when releasing the
    not-owned mutex, should somewhere acquire it.
    
    In the end this functions currently can be called with or without
    the SolarMutex being owned by the calling thread.
    
    This conditional release is really a horrible hack / workaround;
    but my guess is - like all hacks - it'll stay for longer.
    
    Change-Id: I90e30149c2fef8bdf3dc0396bf8eb7491eedeabd
    Reviewed-on: https://gerrit.libreoffice.org/49717
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index f03372de3f54..59f62217c6ac 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -172,7 +172,11 @@ UUIInteractionHelper::handleRequest(
         HandleData aHD(rRequest);
         Link<void*,void> aLink(&aHD,handlerequest);
         Application::PostUserEvent(aLink,this);
+        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
@@ -223,7 +227,11 @@ UUIInteractionHelper::getStringFromRequest(
         HandleData aHD(rRequest);
         Link<void*,void> aLink(&aHD,getstringfromrequest);
         Application::PostUserEvent(aLink,this);
+        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


More information about the Libreoffice-commits mailing list