gh-136251: Improvements to WASM demo REPL (GH-136252)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
This commit is contained in:
adam j hartz 2025-07-21 05:56:45 -04:00 committed by GitHub
parent 9c7b2af73d
commit d1d526afe7
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,