diff options
Diffstat (limited to 'src/postamble.js')
-rw-r--r-- | src/postamble.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/postamble.js b/src/postamble.js index bb1e334c..b90049bc 100644 --- a/src/postamble.js +++ b/src/postamble.js @@ -48,10 +48,6 @@ Module['callMain'] = Module.callMain = function callMain(args) { args = args || []; - if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { - Module.printErr('preload time: ' + (Date.now() - preloadStartTime) + ' ms'); - } - ensureInitRuntime(); var argc = args.length+1; @@ -130,6 +126,10 @@ function run(args) { preMain(); + if (ENVIRONMENT_IS_WEB && preloadStartTime !== null) { + Module.printErr('pre-main prep time: ' + (Date.now() - preloadStartTime) + ' ms'); + } + if (Module['_main'] && shouldRunNow) { Module['callMain'](args); } @@ -181,7 +181,13 @@ function abort(text) { ABORT = true; EXITSTATUS = 1; - throw 'abort() at ' + stackTrace(); +#if ASSERTIONS == 0 + var extra = '\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.'; +#else + var extra = ''; +#endif + + throw 'abort() at ' + stackTrace() + extra; } Module['abort'] = Module.abort = abort; |