diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-07-27 09:57:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-07-27 13:38:40 +0200 |
commit | b4a46b47b6c1eab5c293648f5d89e61dd4639213 (patch) | |
tree | 667392a2e84e577c30d3d018372fb1cd92302349 /bridges/source/cpp_uno/gcc3_linux_sparc64 | |
parent | 0aea34da123edc8e1be8626769f0ab83b6d0cab8 (diff) |
Revert "osl::Mutex->std::mutex in bridges/except"
This reverts commit 739aaf02db3353fac8490272cab0c9486570f76d. At least in
bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx, getRTTI can call itself
recursively, causing a deadlock on RTTI::m_mutex. In
bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx that has been addressed with
RTTI::getRTTI_NoLock, but other implementations have not been modified. Avoid
regressions, esp. on more esoteric platforms, by reverting the change.
Conflicts:
bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx
Change-Id: I08b57b0561923bdbe191c8e93f8f400e0e4df337
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119442
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_sparc64')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_sparc64/except.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc64/except.cxx index 9eaedb8f0566..a87eeac162db 100644 --- a/bridges/source/cpp_uno/gcc3_linux_sparc64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_sparc64/except.cxx @@ -24,11 +24,11 @@ #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> +#include <osl/mutex.hxx> #include <com/sun/star/uno/genfunc.hxx> #include <typelib/typedescription.hxx> #include <uno/any2.h> -#include <mutex> #include <unordered_map> #include "share.hxx" @@ -87,7 +87,7 @@ class RTTI { typedef std::unordered_map< OUString, type_info * > t_rtti_map; - std::mutex m_mutex; + Mutex m_mutex; t_rtti_map m_rttis; t_rtti_map m_generatedRttis; @@ -117,7 +117,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; - std::lock_guard guard( m_mutex ); + MutexGuard guard( m_mutex ); t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); if (iFind == m_rttis.end()) { |