diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-04 15:28:37 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-04 14:46:01 +0100 |
commit | e128f7806961b391cfb265a1ce009b2e036622ca (patch) | |
tree | eda1097987f07ac6e2f507f898b71ddf929e0635 /bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx | |
parent | replace double-checked locking patterns with thread safe local statics (diff) | |
download | core-e128f7806961b391cfb265a1ce009b2e036622ca.tar.gz core-e128f7806961b391cfb265a1ce009b2e036622ca.zip |
replace double-checked locking patterns with thread safe local statics
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323
Reviewed-on: https://gerrit.libreoffice.org/62839
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx index f0be82713583..9331665fab7f 100644 --- a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx @@ -223,17 +223,8 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) // destruct uno exception ::uno_any_destruct( pUnoExc, 0 ); // avoiding locked counts - static RTTI * s_rtti = 0; - if (! s_rtti) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if (! s_rtti) - { - static RTTI rtti_data; - s_rtti = &rtti_data; - } - } - rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr ); + static RTTI rtti_data; + rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr); TYPELIB_DANGER_RELEASE( pTypeDescr ); if (! rtti) terminate(); |