[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - desktop/source vcl/headless

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Mon May 13 14:08:27 UTC 2019


 desktop/source/lib/init.cxx |    4 ++++
 vcl/headless/svpinst.cxx    |   14 --------------
 2 files changed, 4 insertions(+), 14 deletions(-)

New commits:
commit dfce90714dcc1d797d57578ec5f6f1f5f6db6af3
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon May 13 14:22:20 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon May 13 17:06:37 2019 +0300

    Using the m_FeedbackFDs is now necessary also on iOS
    
    Until recently we had managed without them on iOS, but that changed
    with the recent "Unipoll" work, I think. (Without this change, the iOS
    app now runs into assertion failures early on. But note that this
    change is not enough to make it work fully again.)
    
    Change-Id: I09d25326ba73ce897da5c91f30530f5b3d5fd272

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 96364ae07e54..7161521624d9 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -73,9 +73,7 @@ SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex )
     m_nTimeoutMS            = 0;
 
     m_MainThread = osl::Thread::getCurrentIdentifier();
-#ifndef IOS
     CreateWakeupPipe(true);
-#endif
     if( s_pDefaultInstance == nullptr )
         s_pDefaultInstance = this;
 #if !defined(ANDROID) && !defined(IOS)
@@ -87,13 +85,9 @@ SvpSalInstance::~SvpSalInstance()
 {
     if( s_pDefaultInstance == this )
         s_pDefaultInstance = nullptr;
-#ifndef IOS
     CloseWakeupPipe(true);
-#endif
 }
 
-#ifndef IOS
-
 void SvpSalInstance::CloseWakeupPipe(bool log)
 {
     SvpSalYieldMutex *const pMutex(dynamic_cast<SvpSalYieldMutex*>(mpSalYieldMutex.get()));
@@ -149,8 +143,6 @@ void SvpSalInstance::CreateWakeupPipe(bool log)
     }
 }
 
-#endif
-
 void SvpSalInstance::TriggerUserEventProcessing()
 {
     Wakeup();
@@ -332,11 +324,7 @@ void SvpSalYieldMutex::doAcquire(sal_uInt32 const nLockCount)
                 m_bNoYieldLock = true;
                 bool const bEvents = pInst->DoYield(false, request == SvpRequest::MainThreadDispatchAllEvents);
                 m_bNoYieldLock = false;
-#ifdef IOS
-                (void)bEvents;
-#else
                 write(m_FeedbackFDs[1], &bEvents, sizeof(bool));
-#endif
             }
         }
         while (true);
@@ -496,11 +484,9 @@ bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
                 : SvpRequest::MainThreadDispatchOneEvent);
 
         bool bDidWork(false);
-#ifndef IOS
         // blocking read (for synchronisation)
         auto const nRet = read(pMutex->m_FeedbackFDs[0], &bDidWork, sizeof(bool));
         assert(nRet == 1); (void) nRet;
-#endif
         if (!bDidWork && bWait)
         {
             // block & release YieldMutex until the main thread does something
commit 74264014090b6d31070b3bb38a1a2bb00f5b05ee
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Apr 24 13:19:44 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon May 13 15:27:02 2019 +0300

    tdf#124923: Need to call InitVCL() on iOS before using SolarMutexGuard
    
    Change-Id: If5781ae101e58c26368e57787cb301f84ffa82a5

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index cd0d8677103f..f0453fefcad1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4627,6 +4627,10 @@ static void lo_runLoop(LibreOfficeKit* /*pThis*/,
                        LibreOfficeKitWakeCallback pWakeCallback,
                        void* pData)
 {
+#ifdef IOS // Maybe ANDROID, too?
+    InitVCL();
+#endif
+
     SolarMutexGuard aGuard;
 
     vcl::lok::registerPollCallbacks(pPollCallback, pWakeCallback, pData);


More information about the Libreoffice-commits mailing list