diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-08-23 17:49:39 +0200 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-08-23 22:06:38 +0200 |
commit | 96f3aeaa70d91b26861ac28f0b077b46546d3676 (patch) | |
tree | b4f5fd69921fb5fdfbc100e577f4b216a9b31a9c /desktop | |
parent | 7d37241dcb7aa20adfa7510323cfd7984ff5e911 (diff) |
Emscripten: Only resolve Module.uno_init after Module.uno_mainPort is set
Otherwise, client code (which is run as soon as Module.uno_init is resolved)
could try to use Module.uno_mainPort before it has been set.
Change-Id: Ibac992d965f43e9f6766d06e3bd80f1964258b19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172326
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/appinit.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 1dc962e7a008..3a8bce551d6a 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -86,6 +86,7 @@ EM_JS(void, setupMainChannel, (), { if (e.data.cmd === "LOWA-channel") { self.onmessage = orig; Module.uno_mainPort = e.ports[0]; + Module.uno_init$resolve(); } else if (orig) { orig(e); } @@ -119,7 +120,6 @@ void initUno() { runUnoScriptUrl(url.getStr()); } setupMainChannel(); - EM_ASM(Module.uno_init$resolve();); emscripten_async_run_in_main_runtime_thread(EM_FUNC_SIG_V, resolveUnoMain); } |