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

New commits:
commit 28b1b9af5e1388940b4c59503092c0f804e4bac6
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Mon May 26 14:47:54 2025 +0200
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Mon May 26 17:31:51 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 <[email protected]>
    Tested-by: Jenkins

diff --git a/shell/source/unix/exec/shellexec.cxx 
b/shell/source/unix/exec/shellexec.cxx
index 5d421f2609fc..abc197acde23 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