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

Stephan Bergmann sbergman at redhat.com
Tue Apr 5 13:29:43 UTC 2016


 desktop/source/app/officeipcthread.cxx |    6 +++---
 desktop/source/app/officeipcthread.hxx |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 739cbf2e0952532f96cb74689fa5a3bc8be8eb11
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 5 15:23:51 2016 +0200

    RequestHandler::Disable(join = false) is problematic
    
    ...as it causes ~RequestHandler to be called with mIpcThread still running,
    triggering the assert in ~RequestHandler and keeping the thread potentially
    still running during exit.
    
    The odd SalMainPipeExchangeSignal_impl acting upong just SIGTERM (instead of
    turning off the IPC thread early for each invocation of LO's signal handler,
    say) is effectively like that ever since
    ee3351d78c9b6ffbc4dfe62853e81b84e65879c7 "#89023# splash screen optimization";
    just change it to use RequestHandler::SetDowning instead.
    
    Change-Id: I238476706c2463130a6ede64a062d46af953ba6f

diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 460d2c3..e9feb5c 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -300,7 +300,7 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent )
 oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo)
 {
     if( pInfo->Signal == osl_Signal_Terminate )
-        RequestHandler::Disable(false);
+        RequestHandler::SetDowning();
     return osl_Signal_ActCallNextHdl;
 }
 
@@ -879,7 +879,7 @@ RequestHandler::Status PipeIpcThread::enable(rtl::Reference<IpcThread> * thread)
     }
 }
 
-void RequestHandler::Disable(bool join)
+void RequestHandler::Disable()
 {
     osl::ClearableMutexGuard aMutex( GetMutex() );
 
@@ -899,7 +899,7 @@ void RequestHandler::Disable(bool join)
         handler->cReady.set();
 
         // exit gracefully and join
-        if (join && handler->mIpcThread.is())
+        if (handler->mIpcThread.is())
         {
             handler->mIpcThread->join();
             handler->mIpcThread.clear();
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
index 1d3b2cc..5e8957d 100644
--- a/desktop/source/app/officeipcthread.hxx
+++ b/desktop/source/app/officeipcthread.hxx
@@ -120,7 +120,7 @@ class RequestHandler: public salhelper::SimpleReferenceObject
 
     // return sal_False if second office
     static Status               Enable(bool ipc);
-    static void                 Disable(bool join = true);
+    static void                 Disable();
     // start dispatching events...
     static void                 SetReady();
     static void                 WaitForReady();


More information about the Libreoffice-commits mailing list