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

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 18 21:23:40 UTC 2020


 stoc/source/javavm/javavm.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8c5c6b8993a52c40b9de231e778204bcdca16333
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Fri Dec 4 16:11:12 2020 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Fri Dec 18 22:22:58 2020 +0100

    lok: add pre-condition "DontEnableJava"
    
    The context data "DontEnableJava" is set when
    it is not required to JVM to get involved,
    in particular case when the Macro Selector Dialog
    tries to fill the macro scripts, but the client side
    has disabled the JVM and it produces a lot of checks
    to try to get booted the JVM.
    
    Is there any reason why it is not a pre-condition
    at the beginning of the function?
    
    Change-Id: I3bd4a22ddef12a130ea5ecd08c67f1db66bbac72
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107242
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 1b7a86e712ec..ccb8ca232813 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -574,6 +574,9 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
     if (aId != aProcessId)
         return css::uno::Any();
 
+    if (comphelper::IsContextFlagActive("DontEnableJava"))
+        return css::uno::Any();
+
     std::unique_ptr<JavaInfo> info;
     while (!m_xVirtualMachine.is()) // retry until successful
     {


More information about the Libreoffice-commits mailing list