summaryrefslogtreecommitdiff
path: root/cppuhelper/source
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source')
-rwxr-xr-xcppuhelper/source/cc5_solaris_sparc.map5
-rw-r--r--cppuhelper/source/component.cxx4
-rw-r--r--cppuhelper/source/gcc3.map6
-rw-r--r--cppuhelper/source/implbase.cxx4
-rw-r--r--cppuhelper/source/msvc_win32_intel.map5
-rw-r--r--cppuhelper/source/tdmgr.cxx12
-rw-r--r--cppuhelper/source/weak.cxx34
7 files changed, 50 insertions, 20 deletions
diff --git a/cppuhelper/source/cc5_solaris_sparc.map b/cppuhelper/source/cc5_solaris_sparc.map
index 0c3f1c556d64..0961c6830d1f 100755
--- a/cppuhelper/source/cc5_solaris_sparc.map
+++ b/cppuhelper/source/cc5_solaris_sparc.map
@@ -379,3 +379,8 @@ UDK_3.6 { # OOo 3.0
__1cEcppuSOPropertySetHelper2t5B6Mrn0ATOBroadcastHelperVar4n0AbIOMultiTypeInterfaceContainerHelper_nDcomDsunEstarDunoEType___pn0AWIEventNotificationHook_b_v_;
__1cEcppuSOPropertySetHelper2t6Mrn0ATOBroadcastHelperVar4n0AbIOMultiTypeInterfaceContainerHelper_nDcomDsunEstarDunoEType___pn0AWIEventNotificationHook_b_v_;
} UDK_3.5;
+
+UDK_3.7 { # OOo 3.3
+ global:
+ __1cEcppuLOWeakObjectbAdisposeWeakConnectionPoint6M_v_;
+} UDK_3.6;
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index d94614703be5..728f6815c309 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -90,6 +90,10 @@ void OComponentHelper::release() throw()
{
if (! rBHelper.bDisposed)
{
+ // *before* again incrementing our ref count, ensure that our weak connection point
+ // will not create references to us anymore (via XAdapter::queryAdapted)
+ disposeWeakConnectionPoint();
+
Reference<XInterface > xHoldAlive( *this );
// First dispose
try
diff --git a/cppuhelper/source/gcc3.map b/cppuhelper/source/gcc3.map
index 819c3e046b30..9348e91525c0 100644
--- a/cppuhelper/source/gcc3.map
+++ b/cppuhelper/source/gcc3.map
@@ -373,3 +373,9 @@ UDK_3.5 { # OOo 3.0
_ZN4cppu18OPropertySetHelperC1ERNS_19OBroadcastHelperVarINS_34OMultiTypeInterfaceContainerHelperEN3com3sun4star3uno4TypeEEEPNS_22IEventNotificationHookEb;
_ZN4cppu18OPropertySetHelperC2ERNS_19OBroadcastHelperVarINS_34OMultiTypeInterfaceContainerHelperEN3com3sun4star3uno4TypeEEEPNS_22IEventNotificationHookEb;
} UDK_3.4;
+
+UDK_3.6 { # OOo 3.3
+ global:
+ _ZN4cppu11OWeakObject26disposeWeakConnectionPointEv;
+} UDK_3.5;
+
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 9caa4ca93615..acf05724c71b 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -247,6 +247,8 @@ void WeakComponentImplHelperBase::release()
throw ()
{
if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ // ensure no other references are created, via the weak connection point, from now on
+ disposeWeakConnectionPoint();
// restore reference count:
osl_incrementInterlockedCount( &m_refCount );
if (! rBHelper.bDisposed) {
@@ -381,6 +383,8 @@ void WeakAggComponentImplHelperBase::release()
OWeakAggObject::release();
}
else if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ // ensure no other references are created, via the weak connection point, from now on
+ disposeWeakConnectionPoint();
// restore reference count:
osl_incrementInterlockedCount( &m_refCount );
if (! rBHelper.bDisposed) {
diff --git a/cppuhelper/source/msvc_win32_intel.map b/cppuhelper/source/msvc_win32_intel.map
index a90ec88f3ca3..c999ae200ac2 100644
--- a/cppuhelper/source/msvc_win32_intel.map
+++ b/cppuhelper/source/msvc_win32_intel.map
@@ -271,3 +271,8 @@ UDK_3.5 { # OOo 3.0
global:
??0OPropertySetHelper@cppu@@QAE@AAU?$OBroadcastHelperVar@VOMultiTypeInterfaceContainerHelper@cppu@@VType@uno@star@sun@com@@@1@PAVIEventNotificationHook@1@_N@Z;
} UDK_3.4;
+
+UDK_3.6 { # OOo 3.3
+ global:
+ ?disposeWeakConnectionPoint@OWeakObject@cppu@@IAEXXZ;
+} UDK_3.5;
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 306ace09d592..6f2aa70ea2d5 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -688,17 +688,17 @@ static void SAL_CALL typelib_callback(
catch (container::NoSuchElementException & exc)
{
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- 0, OUStringToOString(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "typelibrary type not available: ") ) +
+ OSL_TRACE(
+ "typelibrary type not available: %s",
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (Exception & exc)
{
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- 0, OUStringToOString(
+ OSL_TRACE(
+ "%s",
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index c4055eba4f8a..b518d2526e3b 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -216,25 +216,31 @@ void SAL_CALL OWeakObject::release() throw()
if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
// notify/clear all weak-refs before object's dtor is executed
// (which may check weak-refs to this object):
- if (m_pWeakConnectionPoint != 0) {
- OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
- m_pWeakConnectionPoint = 0;
- try {
- p->dispose();
- }
- catch (RuntimeException const& exc) {
- OSL_ENSURE(
- false, OUStringToOString(
- exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
- static_cast<void>(exc);
- }
- p->release();
- }
+ disposeWeakConnectionPoint();
// destroy object:
delete this;
}
}
+void OWeakObject::disposeWeakConnectionPoint()
+{
+ OSL_PRECOND( m_refCount == 0, "OWeakObject::disposeWeakConnectionPoint: only to be called with a ref count of 0!" );
+ if (m_pWeakConnectionPoint != 0) {
+ OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
+ m_pWeakConnectionPoint = 0;
+ try {
+ p->dispose();
+ }
+ catch (RuntimeException const& exc) {
+ OSL_ENSURE(
+ false, OUStringToOString(
+ exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ static_cast<void>(exc);
+ }
+ p->release();
+ }
+}
+
OWeakObject::~OWeakObject() SAL_THROW( (RuntimeException) )
{
}