fix opengl slide transition

regression from
    commit 62efb18866
    use comphelper::WeakComponentImplHelper in SlideShowVie

Switch notifyEach to leave the mutex locked after being called,
because that seems to compose better - because after a call
it is in the same state that was when we entered the call.

Change-Id: I42e80cc7be1b65ed8cab24ab7c11210e056d916d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-01-21 13:44:57 +01:00
parent 47f21d2900
commit 4304947164
9 changed files with 3 additions and 11 deletions
@@ -72,7 +72,6 @@ void SAL_CALL OInstanceLocker::dispose()
lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
m_aListenersContainer.disposeAndClear( aGuard, aSource );
aGuard.lock();
if ( m_xLockListener.is() )
{
auto tmp = std::move(m_xLockListener);
+1 -1
View File
@@ -272,7 +272,6 @@ inline void OInterfaceContainerHelper4<T>::forEach(std::unique_lock<std::mutex>&
{
if (std::as_const(maData)->size() == 0)
{
rGuard.unlock(); // code depends on the guard being unlocked after return
return;
}
maData.make_unique(); // so we can iterate over the data without holding the lock
@@ -374,6 +373,7 @@ void OInterfaceContainerHelper4<ListenerT>::disposeAndClear(std::unique_lock<std
// there is no way to delegate the error to the caller :o(.
}
}
rGuard.lock();
}
template <class ListenerT>
-2
View File
@@ -257,7 +257,6 @@ void SfxGlobalEvents_Impl::dispose() {
tmpModels.clear();
g.lock();
m_aLegacyListeners.disposeAndClear(g, {static_cast<OWeakObject *>(this)});
g.lock(); // because disposeAndClear is going to want to unlock()
m_aDocumentListeners.disposeAndClear(g, {static_cast<OWeakObject *>(this)});
}
for (auto const & i: listeners) {
@@ -487,7 +486,6 @@ void SfxGlobalEvents_Impl::implts_notifyListener(const document::DocumentEvent&
xListener->notifyEvent(aLegacyEvent);
}
);
g.lock();
m_aDocumentListeners.forEach(g,
[&aEvent](const css::uno::Reference<document::XDocumentEventListener>& xListener)
{
@@ -232,7 +232,6 @@ void SAL_CALL OFSInputStreamContainer::dispose( )
lang::EventObject aSource( static_cast< ::cppu::OWeakObject*>( this ) );
m_aListenersContainer.disposeAndClear( aGuard, aSource );
aGuard.lock();
m_bDisposed = true;
}
-1
View File
@@ -227,7 +227,6 @@ void SAL_CALL OFSStreamContainer::dispose()
lang::EventObject aSource( static_cast< ::cppu::OWeakObject*>( this ) );
m_aListenersContainer.disposeAndClear( aGuard, aSource );
aGuard.lock();
m_bDisposed = true;
}
+2
View File
@@ -1007,6 +1007,8 @@ SvxAcceptChgCtr::SvxAcceptChgCtr(weld::Container* pParent, weld::Window* pDialog
SvxAcceptChgCtr::~SvxAcceptChgCtr()
{
m_xTPFilter.reset();
m_xTPView.reset();
}
void SvxAcceptChgCtr::ShowFilterPage()
-2
View File
@@ -2270,7 +2270,6 @@ void SAL_CALL SwChartDataSequence::dispose( )
lang::EventObject aEvtObj( static_cast< chart2::data::XDataSequence * >(this) );
std::unique_lock aGuard( GetChartMutex() );
m_aModifyListeners.disposeAndClear( aGuard, aEvtObj );
aGuard.lock();
m_aEvtListeners.disposeAndClear( aGuard, aEvtObj );
}
@@ -2685,7 +2684,6 @@ void SAL_CALL SwChartLabeledDataSequence::dispose( )
lang::EventObject aEvtObj( static_cast< chart2::data::XLabeledDataSequence * >(this) );
std::unique_lock aGuard( GetChartMutex() );
m_aModifyListeners.disposeAndClear( aGuard, aEvtObj );
aGuard.lock();
m_aEventListeners.disposeAndClear( aGuard, aEvtObj );
}
}
-1
View File
@@ -3080,7 +3080,6 @@ void SwXTextTable::Impl::Notify(const SfxHint& rHint)
lang::EventObject const ev(xThis);
std::unique_lock aGuard(m_Mutex);
m_EventListeners.disposeAndClear(aGuard, ev);
aGuard.lock();
m_ChartListeners.disposeAndClear(aGuard, ev);
}
else
-2
View File
@@ -241,7 +241,6 @@ void SAL_CALL ResultSet::dispose()
lang::EventObject aEvt;
aEvt.Source = static_cast< lang::XComponent * >( this );
m_pImpl->m_aDisposeEventListeners.disposeAndClear( aGuard, aEvt );
aGuard.lock();
}
if ( m_pImpl->m_pPropertyChangeListeners )
@@ -249,7 +248,6 @@ void SAL_CALL ResultSet::dispose()
lang::EventObject aEvt;
aEvt.Source = static_cast< beans::XPropertySet * >( this );
m_pImpl->m_pPropertyChangeListeners->disposeAndClear( aGuard, aEvt );
aGuard.lock();
}
m_pImpl->m_xDataSupplier->close();