MCPcopy
hub / github.com/Pradumnasaraf/DevOps / exitJS

Function exitJS

docs/webassembly/files/apps/hello-world/hello.js:1106–1118  ·  view source on GitHub ↗
(status, implicit)

Source from the content-addressed store, hash-verified

1104
1105 /** @param {boolean|number=} implicit */
1106 var exitJS = (status, implicit) => {
1107 EXITSTATUS = status;
1108
1109 checkUnflushedContent();
1110
1111 // if exit() was called explicitly, warn the user if the runtime isn't actually being shut down
1112 if (keepRuntimeAlive() && !implicit) {
1113 var msg = `program exited (with status: ${status}), but keepRuntimeAlive() is set (counter=${runtimeKeepaliveCounter}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;
1114 err(msg);
1115 }
1116
1117 _proc_exit(status);
1118 };
1119
1120 var handleException = (e) => {
1121 // Certain exception types we do not treat as errors since they are used for

Callers 1

callMainFunction · 0.85

Calls 3

checkUnflushedContentFunction · 0.85
keepRuntimeAliveFunction · 0.85
_proc_exitFunction · 0.85

Tested by

no test coverage detected