[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - ucb/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 20 21:16:01 UTC 2020


 ucb/source/ucp/gio/gio_provider.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 1c081112714e6722f2d9541e9684107526478a39
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Jan 20 19:34:34 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Jan 20 22:15:28 2020 +0100

    lok: disable ucbgio provider for Online.
    
    Of course, some lok apps may want the provider, but it creates
    unwanted threads causing problems with forkit in some cases.
    
    Change-Id: I7d19d629b3657780b52c3c753a4c8dcba6ae86b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87098
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx
index d68a3bc59984..5b94d9a5374c 100644
--- a/ucb/source/ucp/gio/gio_provider.cxx
+++ b/ucb/source/ucp/gio/gio_provider.cxx
@@ -120,11 +120,25 @@ ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
 
 }
 
+// gio creates threads we don't want in online's forkit
+static bool isDisabled()
+{
+    const char *pDisable = getenv("UNODISABLELIBRARY");
+    if (!pDisable)
+        return false;
+    OString aDisable(pDisable, strlen(pDisable));
+    return aDisable.indexOf("ucpgio1") >= 0;
+}
+
 extern "C" SAL_DLLPUBLIC_EXPORT void * ucpgio1_component_getFactory( const sal_Char *pImplName,
     void *pServiceManager, void * )
 {
     void * pRet = nullptr;
 
+    static bool bDisabled = isDisabled();
+    if (bDisabled)
+        return nullptr;
+
     uno::Reference< lang::XMultiServiceFactory > xSMgr
         (static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
     uno::Reference< lang::XSingleServiceFactory > xFactory;


More information about the Libreoffice-commits mailing list