summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-12-04 16:11:12 -0400
committerHenry Castro <hcastro@collabora.com>2020-12-18 22:22:58 +0100
commit8c5c6b8993a52c40b9de231e778204bcdca16333 (patch)
tree9773be6909b6b0b88a25ff22e1b7b82966c2bc02 /stoc
parent92990e87a66758189e3324995ebe29cc026687a2 (diff)
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@collabora.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/javavm/javavm.cxx3
1 files changed, 3 insertions, 0 deletions
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
{