diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-11-07 16:14:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-07 16:16:40 +0100 |
commit | 74670bf04e0dc693de6ea060d0dd2c10ee3b184d (patch) | |
tree | 2eeec8aa9fb7b09a53285b912acbb325b09c91f8 /embeddedobj/source/commonembedding | |
parent | enhance documentation of Currency legacyOnly attribute (diff) | |
download | core-74670bf04e0dc693de6ea060d0dd2c10ee3b184d.tar.gz core-74670bf04e0dc693de6ea060d0dd2c10ee3b184d.zip |
fdo#56818 Work around deadlock caused by differing lock orders
Change-Id: Iaabe36bf0c1f051f9cebc2b65e614063698959fa
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index df75afe66b9b..941186d50370 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -40,6 +40,7 @@ #include <comphelper/processfactory.hxx> #include <rtl/logfile.hxx> +#include <vcl/svapp.hxx> #include <targetstatecontrol.hxx> @@ -529,6 +530,16 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) { RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" ); + SolarMutexGuard aSolarGuard; + //TODO: a gross hack to avoid deadlocks when this is called from the + // outside and OCommonEmbeddedObject::changeState, with m_aMutex locked, + // calls into framework code that tries to lock the solar mutex, while + // another thread (through Window::ImplCallPaint, say) calls + // OCommonEmbeddedObject::getComponent with the solar mutex locked and + // then tries to lock m_aMutex (see fdo#56818); the alternative would be + // to get locking done right in this class, but that looks like a + // daunting task + ::osl::ResettableMutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) throw lang::DisposedException(); // TODO |