aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-20 16:31:44 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-20 16:31:44 -0700
commitaee53a0899d31926113d23536d1277c5d96e8fd0 (patch)
tree33f9db72e5d5a04faf784b603e86ade2b17ffd6f /src/postamble.js
parente7684016a014cd17ea9525bf8ba8909464e052eb (diff)
do not exist runtime if simulating an infinite loop
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/postamble.js b/src/postamble.js
index 561ee826..dd4f4f37 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -30,7 +30,9 @@ Module.callMain = function callMain(args) {
catch(e) {
if (e.name == 'ExitStatus') {
return e.status;
- } else if (e !== 'SimulateInfiniteLoop') {
+ } else if (e == 'SimulateInfiniteLoop') {
+ Module['noExitRuntime'] = true;
+ } else {
throw e;
}
} finally {