[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - uui/source
Jan-Marek Glogowski
glogow at fbihome.de
Thu Feb 15 12:50:27 UTC 2018
uui/source/iahndl.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit a8a0e22edc53a58b293771ef793e9d6a0ac2f712
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>
(cherry picked from commit 0e04523b040785e2ce552143d20adcbb40b61d42)
Reviewed-on: https://gerrit.libreoffice.org/49795
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index e2ce02c659d5..67f28e089e51 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