[3.14] gh-136251: Improvements to WASM demo REPL (GH-136252) (GH-136977)

(cherry picked from commit d1d526afe7)

Co-authored-by: adam j hartz <adam@smatz.net>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-07-22 13:25:35 +02:00 committed by GitHub
parent c59a60bdb4
commit 4f1f648c3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 327 additions and 56 deletions

View file

@ -100,7 +100,7 @@ EM_JS_MACROS(void, _emscripten_promising_main_js, (void), {
return;
}
const origResolveGlobalSymbol = resolveGlobalSymbol;
if (!Module.onExit && process?.exit) {
if (!Module.onExit && globalThis?.process?.exit) {
Module.onExit = (code) => process.exit(code);
}
// * wrap the main symbol with WebAssembly.promising,