framework/source/helper/statusindicatorfactory.cxx |    3 +++
 package/source/zipapi/ZipFile.cxx                  |    2 ++
 sax/source/fastparser/fastparser.cxx               |    4 ++++
 3 files changed, 9 insertions(+)

New commits:
commit 4a0ccb5fec19c2f42b9c206d9c2007c355345eb2
Author:     Armin Le Grand (Allotropia) <armin.le.gr...@me.com>
AuthorDate: Fri Nov 12 17:16:32 2021 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Thu Jan 20 14:27:16 2022 +0100

    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 <glo...@fbihome.de>

diff --git a/framework/source/helper/statusindicatorfactory.cxx 
b/framework/source/helper/statusindicatorfactory.cxx
index a3f9b864dbe8..6aacbd040d3b 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -87,6 +87,9 @@ void SAL_CALL StatusIndicatorFactory::initialize(const 
css::uno::Sequence< css::
        }
     }
 
+#ifdef EMSCRIPTEN
+    m_bDisableReschedule = true;
+#endif
     impl_createProgress();
 }
 
diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 2b298e0ebdf8..3e9d24858df1 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -651,11 +651,13 @@ uno::Reference< XInputStream > 
ZipFile::createStreamForZipEntry(
         return xSrcStream;
 
     uno::Reference<io::XInputStream> xBufStream;
+#ifndef EMSCRIPTEN
     static const sal_Int32 nThreadingThreshold = 10000;
 
     if( xSrcStream->available() > nThreadingThreshold )
         xBufStream = new XBufferedThreadedStream(xSrcStream, 
xSrcStream->getSize());
     else
+#endif
         xBufStream = new XBufferedStream(xSrcStream);
 
     return xBufStream;
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)
     {

Reply via email to