summaryrefslogtreecommitdiff
path: root/sax/source
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <Armin.Le.Grand@me.com>2021-11-12 17:16:32 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2022-01-20 14:27:16 +0100
commit4a0ccb5fec19c2f42b9c206d9c2007c355345eb2 (patch)
tree34dd4013bd45dee39bdd4aa1a9e0bde6b40d49fd /sax/source
parent9fbda3ca63c940dac566076eeeb54a7b33f3da3c (diff)
WASM make test file loading work
Change-Id: Ic34104534c3e0e73791cf867bfb2e1246dc79cf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128653 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sax/source')
-rw-r--r--sax/source/fastparser/fastparser.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index f6fe5ee43bec..e4f0915421af 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -838,6 +838,9 @@ void FastSaxParserImpl::parseStream(const InputSource& rStructSource)
rEntity.mxDocumentHandler->startDocument();
}
+#ifdef EMSCRIPTEN
+ rEntity.mbEnableThreads = false;
+#else
if (!getenv("SAX_DISABLE_THREADS") && !m_bDisableThreadedParser)
{
Reference<css::io::XSeekable> xSeekable(rEntity.maStructSource.aInputStream, UNO_QUERY);
@@ -845,6 +848,7 @@ void FastSaxParserImpl::parseStream(const InputSource& rStructSource)
rEntity.mbEnableThreads = (xSeekable.is() && xSeekable->getLength() > 10000)
|| (rEntity.maStructSource.aInputStream->available() > 10000);
}
+#endif
if (rEntity.mbEnableThreads)
{