diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-11-14 21:23:48 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-11-14 21:23:48 -0800 |
commit | ee0166c83cd91a469bbe2d1da3c27f180da7b582 (patch) | |
tree | ca61137046a01c43e3579c93ef9bc5a0cee4a7a3 /src/postamble.js | |
parent | 1a9c1c95c6552f835f53493299e90a9f6743c6f7 (diff) |
handle global constants that are llvm function calls +test
Diffstat (limited to 'src/postamble.js')
-rw-r--r-- | src/postamble.js | 5 |
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() { |