diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-09 16:25:56 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-09 17:26:57 -0700 |
commit | 7b2d1583a184edef4b920982426706224b937414 (patch) | |
tree | 8f93cbbd4990365241b17fd7e2a9b355eb1d2cd1 /src/preamble.js | |
parent | bba3cd9cf5d797a2aef02bf966d595d3ec3cbcad (diff) |
run postsets right before main, and after the memory initializer has been set up
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 56f01751..6961a0e9 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -701,6 +701,10 @@ var nullString = allocate(intArrayFromString('(null)'), 'i8', ALLOC_STACK); function callRuntimeCallbacks(callbacks) { while(callbacks.length > 0) { var callback = callbacks.shift(); + if (typeof callback == 'function') { + callback(); + continue; + } var func = callback.func; if (typeof func === 'number') { if (callback.arg === undefined) { |