diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-11-13 15:32:30 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-11-15 16:06:07 +0000 |
commit | 10511acd0839635ce6595d9e5b8aa9136b6bde38 (patch) | |
tree | a6fbced69da997685603ab8d5c45e4443fef439e /bridges/source/cpp_uno/gcc3_linux_hppa | |
parent | d8845ef02f76801f270f936411ce6b36f8caaca8 (diff) |
Revert "sb140: #i117295# use rtl::Static"
This reverts commit d3794d2d8ab2ee3f8118d61538bb753335b37f23.
Conflicts:
bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_hppa')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx index b743471adb56..77a12507ede4 100644 --- a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx @@ -32,7 +32,6 @@ #include <cxxabi.h> #include <boost/unordered_map.hpp> -#include <rtl/instance.hxx> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> #include <osl/diagnose.h> @@ -206,8 +205,6 @@ namespace CPPU_CURRENT_NAMESPACE return rtti; } - struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {}; - //------------------------------------------------------------------ static void deleteException( void * pExc ) { @@ -254,7 +251,22 @@ namespace CPPU_CURRENT_NAMESPACE // destruct uno exception ::uno_any_destruct( pUnoExc, 0 ); - rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr ); + // avoiding locked counts + static RTTI * s_rtti = 0; + if (! s_rtti) + { + MutexGuard guard( Mutex::getGlobalMutex() ); + if (! s_rtti) + { +#ifdef LEAK_STATIC_DATA + s_rtti = new RTTI(); +#else + static RTTI rtti_data; + s_rtti = &rtti_data; +#endif + } + } + rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr ); TYPELIB_DANGER_RELEASE( pTypeDescr ); OSL_ENSURE( rtti, "### no rtti for throwing exception!" ); if (! rtti) |