aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/postamble.js b/src/postamble.js
index 066b83e3..010e6e66 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -13,13 +13,14 @@ function run(args) {
counter--;
var func = globalFuncs.pop();
try {
- func();
+ var x = func();
+ if (x == undefined) throw 'undefined';
} catch (e) {
globalFuncs.unshift(func);
// We will try again later. The global vars we depend on should be resolved by then
- // XXX: We leak here, as we malloc, then fail and catch...
}
}
+ assert(counter > 0);
var argc = args.length+1;
function pad() {