diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/postamble.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/postamble.js b/src/postamble.js index 4a2fbf60..c42d6794 100644 --- a/src/postamble.js +++ b/src/postamble.js @@ -34,6 +34,10 @@ function run(args) { initRuntime(); + if (Module['preRun']) { + Module['preRun'](); + } + var ret = null; if (Module['_main']) { ret = Module.callMain(args); @@ -41,16 +45,17 @@ function run(args) { exitRuntime(); } } + + if (Module['postRun']) { + Module['postRun'](); + } + return ret; } Module['run'] = run; // {{PRE_RUN_ADDITIONS}} -if (Module['preRun']) { - Module['preRun'](); -} - #if INVOKE_RUN #else addRunDependency(); @@ -65,7 +70,3 @@ if (runDependencies == 0) { // {{POST_RUN_ADDITIONS}} -if (Module['postRun']) { - Module['postRun'](); -} - |