diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-05-12 15:10:11 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-05-12 15:10:11 -0700 |
commit | d2f680e7a4eee462dd487e6482c8ee4c27f7c6bb (patch) | |
tree | 9f785c58fbda93fe96946513587b195ed0342668 /src/postamble.js | |
parent | 4fe256e2571b288e98fe81d20eb37f9fba1006f0 (diff) |
clean up shell.js
Diffstat (limited to 'src/postamble.js')
-rw-r--r-- | src/postamble.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/postamble.js b/src/postamble.js index cb0521aa..4943b9e8 100644 --- a/src/postamble.js +++ b/src/postamble.js @@ -21,6 +21,8 @@ Module.callMain = function callMain(args) { } function run(args) { + args = args || Module.arguments; + __initializeRuntime__(); var globalFuncs = []; @@ -39,8 +41,13 @@ Module['run'] = run; // {{PRE_RUN_ADDITIONS}} #if INVOKE_RUN -run(args); +#else +Module.noInitialRun = true; #endif +if (!Module.noInitialRun) { + run(); +} + // {{POST_RUN_ADDITIONS}} |