MCPcopy Create free account
hub / github.com/sql-js/sql.js / exit

Function exit

js/sql-debug.js:403756–403782  ·  view source on GitHub ↗
(status, implicit)

Source from the content-addressed store, hash-verified

403754Module['run'] = run;
403755
403756function exit(status, implicit) {
403757
403758 // if this is just main exit-ing implicitly, and the status is 0, then we
403759 // don't need to do anything here and can just leave. if the status is
403760 // non-zero, though, then we need to report it.
403761 // (we may have warned about this earlier, if a situation justifies doing so)
403762 if (implicit && Module['noExitRuntime'] && status === 0) {
403763 return;
403764 }
403765
403766 if (Module['noExitRuntime']) {
403767 } else {
403768
403769 ABORT = true;
403770 EXITSTATUS = status;
403771 STACKTOP = initialStackTop;
403772
403773 exitRuntime();
403774
403775 if (Module['onExit']) Module['onExit'](status);
403776 }
403777
403778 if (ENVIRONMENT_IS_NODE) {
403779 process['exit'](status);
403780 }
403781 Module['quit'](status, new ExitStatus(status));
403782}
403783Module['exit'] = exit;
403784
403785var abortDecorators = [];

Callers

nothing calls this directly

Calls 1

exitRuntimeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…