diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-10 18:22:14 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-10 18:22:14 -0800 |
commit | 99634e23408315efe0633cd1917794081f4ec4ba (patch) | |
tree | b3539c98addcfff2fcf5b7f2c1d75c71fe9e887f /src/preamble.js | |
parent | 6e77a01fabb47edf569c517b3566d8ba6dd43480 (diff) |
NO_EXIT_RUNTIME option, to set Module.noExitRuntime during compilation
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 25ef1fb3..5038e9c4 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -1027,6 +1027,11 @@ function preMain() { } function exitRuntime() { +#if ASSERTIONS + if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + Module.printErr('Exiting runtime. Any attempt to access the compiled C code may fail from now. If you want to keep the runtime alive, set Module["noExitRuntime"] = true or build with -s NO_EXIT_RUNTIME=1'); + } +#endif callRuntimeCallbacks(__ATEXIT__); } |