[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-0' - connectivity/source include/connectivity
Stephan Bergmann
sbergman at redhat.com
Fri Jul 15 13:18:14 UTC 2016
connectivity/source/commontools/dbtools.cxx | 10 ++++++++--
include/connectivity/OSubComponent.hxx | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 18e8af30aa1d2d3e1cc85a0a0454e04ab156cb88
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jul 12 15:05:41 2016 +0200
tdf#100866: Don't let exception pass connectivity::release
...which is only ever called from onexcept XInterface::release overrides:
connectivity::release itself appears to be only called from
connectivity::OSubComponent::relase_ChildImpl [sic], which in turn is only
called from various XInterface::release overrides across connectivity.
(cherry picked from commit 9624bde1c36a3c1b86d8d88f97bc729ac4d65853)
Conflicts:
connectivity/source/commontools/dbtools.cxx
Change-Id: I94b682ec531acecd0ef9f8c100f67a71c361941e
Reviewed-on: https://gerrit.libreoffice.org/27148
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 69c1524..d31c556 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1966,7 +1966,7 @@ namespace connectivity
void release(oslInterlockedCount& _refCount,
::cppu::OBroadcastHelper& rBHelper,
Reference< XInterface >& _xInterface,
- ::com::sun::star::lang::XComponent* _pObject)
+ ::com::sun::star::lang::XComponent* _pObject) throw ()
{
if (osl_atomic_decrement( &_refCount ) == 0)
{
@@ -1983,7 +1983,13 @@ void release(oslInterlockedCount& _refCount,
}
// First dispose
- _pObject->dispose();
+ try {
+ _pObject->dispose();
+ } catch (css::uno::RuntimeException & e) {
+ SAL_WARN(
+ "connectivity.commontools",
+ "Caught exception during dispose, " << e.Message);
+ }
// only the alive ref holds the object
OSL_ASSERT( _refCount == 1 );
diff --git a/include/connectivity/OSubComponent.hxx b/include/connectivity/OSubComponent.hxx
index 1aa9d15..54eaa37 100644
--- a/include/connectivity/OSubComponent.hxx
+++ b/include/connectivity/OSubComponent.hxx
@@ -43,7 +43,7 @@ namespace connectivity
void release(oslInterlockedCount& _refCount,
::cppu::OBroadcastHelper& rBHelper,
css::uno::Reference< css::uno::XInterface >& _xInterface,
- css::lang::XComponent* _pObject);
+ css::lang::XComponent* _pObject) throw ();
// OSubComponent
@@ -70,7 +70,7 @@ namespace connectivity
::osl::MutexGuard aGuard( m_pDerivedImplementation->WEAK::rBHelper.rMutex );
m_xParent.clear();
}
- void relase_ChildImpl()
+ void relase_ChildImpl() throw ()
{
::connectivity::release(m_pDerivedImplementation->m_refCount,
m_pDerivedImplementation->WEAK::rBHelper,
More information about the Libreoffice-commits
mailing list