[Libreoffice-commits] core.git: framework/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Aug 6 09:13:42 UTC 2018


 framework/source/services/autorecovery.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 2c3b5e0691322bcd541e3259eeb05df641ef5751
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 6 09:16:50 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 6 11:13:06 2018 +0200

    fix for crash in CppunitTest_services on windows
    
    after
        commit 9cceba9a928cf3b3447f293020be2fe76c035ed5
        make DBG_TESTSOLARMUTEX available in assert builds
    
    bt looks like:
    
     #0  0x00007faf569074fd in ImplDbgTestSolarMutex()
     #1  0x00007faf56904df9 in vcl::EventPoster::~EventPoster()
     #2  0x00007faf4392b452 in AutoRecovery::~AutoRecovery()
     #3  0x00007faf4392b589 in AutoRecovery::~AutoRecovery()
     #4  0x00007faf5d03dfc8 in __run_exit_handlers()
    
    Change-Id: If72eece22db89b492d8e69d1abb496168e32cb9d
    Reviewed-on: https://gerrit.libreoffice.org/58636
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 8247183340e9..f0ca35e9f894 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -391,7 +391,7 @@ private:
     Timer m_aTimer;
 
     /** @short  make our dispatch asynchronous ... if required to do so! */
-    vcl::EventPoster m_aAsyncDispatcher;
+    std::unique_ptr<vcl::EventPoster> m_xAsyncDispatcher;
 
     /** @see    DispatchParams
      */
@@ -1209,7 +1209,7 @@ AutoRecovery::AutoRecovery(const css::uno::Reference< css::uno::XComponentContex
     , m_nAutoSaveTimeIntervall  (0                                                  )
     , m_eJob                    (AutoRecovery::E_NO_JOB                             )
     , m_aTimer                  ( "Auto save timer" )
-    , m_aAsyncDispatcher        ( LINK( this, AutoRecovery, implts_asyncDispatch )  )
+    , m_xAsyncDispatcher        (new vcl::EventPoster( LINK( this, AutoRecovery, implts_asyncDispatch )  ))
     , m_eTimerType              (E_DONT_START_TIMER                                 )
     , m_nIdPool                 (0                                                  )
     , m_lListener               (cppu::WeakComponentImplHelperBase::rBHelper.rMutex)
@@ -1241,6 +1241,8 @@ AutoRecovery::~AutoRecovery()
 void AutoRecovery::disposing()
 {
     implts_stopTimer();
+    SolarMutexGuard g;
+    m_xAsyncDispatcher.reset();
 }
 
 Any SAL_CALL AutoRecovery::queryInterface( const css::uno::Type& _rType )
@@ -1335,7 +1337,7 @@ void SAL_CALL AutoRecovery::dispatch(const css::util::URL&
     } /* SAFE */
 
     if (bAsync)
-        m_aAsyncDispatcher.Post();
+        m_xAsyncDispatcher->Post();
     else
         implts_dispatch(aParams);
 }


More information about the Libreoffice-commits mailing list