diff options
Diffstat (limited to 'src/postamble.js')
-rw-r--r-- | src/postamble.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/postamble.js b/src/postamble.js index fb552606..066b83e3 100644 --- a/src/postamble.js +++ b/src/postamble.js @@ -37,14 +37,9 @@ function run(args) { __globalConstructor__(); - _main(argc, argv); - - while( __ATEXIT__.length > 0) { - var func = __ATEXIT__.pop(); - if (typeof func === 'number') { - func = FUNCTION_TABLE[func]; - } - func(); + if (Module['_main']) { + _main(argc, argv); + __shutdownRuntime__(); } } |