summaryrefslogtreecommitdiff
path: root/desktop/source/app/appinit.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/app/appinit.cxx')
-rw-r--r--desktop/source/app/appinit.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 16f023b0a414..6c7637f32f9e 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -54,6 +54,7 @@
#include <emscripten/threading.h>
#include <emscripten/val.h>
#include <bindings_uno.hxx>
+#include <config_emscripten.h>
#endif
using namespace ::com::sun::star::uno;
@@ -94,12 +95,20 @@ EM_JS(void, setupMainChannel, (), {
});
extern "C" void resolveUnoMain(pthread_t id) {
+#if HAVE_EMSCRIPTEN_PROXY_TO_PTHREAD
EM_ASM({
const sofficeMain = PThread.pthreads[$0];
const channel = new MessageChannel();
sofficeMain.postMessage({cmd:"LOWA-channel"}, [channel.port2]);
Module.uno_main$resolve(channel.port1);
}, id);
+#else
+ EM_ASM({
+ const channel = new MessageChannel();
+ postMessage({cmd:"LOWA-channel"}, [channel.port2]);
+ Module.uno_main$resolve(channel.port1);
+ }, id);
+#endif
}
void initUno() {