shell/source/unix/exec/shellexec.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit dced3bc711d18407a2cc2400eb46e8261b663d95
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Mon May 26 14:47:54 2025 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Tue May 27 09:07:10 2025 +0200

    Emscripten: Move execute_browser to the browser main thread
    
    ...so that it can reference the JS `window` object (e.g., when clicking on 
"Help
    - About LibreOffice - Credits")
    
    Change-Id: Ia08226af7bbf5a503be9e0b81c27217ad2775269
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185801
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit 28b1b9af5e1388940b4c59503092c0f804e4bac6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185875
    Tested-by: allotropia jenkins <jenk...@allotropia.de>

diff --git a/shell/source/unix/exec/shellexec.cxx 
b/shell/source/unix/exec/shellexec.cxx
index 153827a003a7..3cc8146a8482 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -41,6 +41,7 @@
 #endif
 
 #ifdef EMSCRIPTEN
+#include <emscripten/threading.h>
 #include <rtl/uri.hxx>
 extern void execute_browser(const char* sUrl);
 #endif
@@ -279,7 +280,8 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, 
const OUString& aPar
 
     OUString sEscapedURI(rtl::Uri::encode(aCommand, rtl_UriCharClassUric,
                                           rtl_UriEncodeIgnoreEscapes, 
RTL_TEXTENCODING_UTF8));
-    execute_browser(sEscapedURI.toUtf8().getStr());
+    emscripten_sync_run_in_main_runtime_thread(
+        EM_FUNC_SIG_VI, execute_browser, sEscapedURI.toUtf8().getStr());
 #endif
 }
 

Reply via email to