diff options
author | Lorant Pinter <lorant.pinter@prezi.com> | 2013-02-27 13:09:43 +0100 |
---|---|---|
committer | Lorant Pinter <lorant.pinter@prezi.com> | 2013-02-27 13:09:43 +0100 |
commit | b54b59686dd99383e98f2d6f27d4bad272fee2b2 (patch) | |
tree | c843fc1285cbb2fcfd840e256b15a1650bc71315 /src | |
parent | 760065dfbc02c32a16dee034b6210bc273419a24 (diff) |
Put back try-catch around closure exported function lookup
Diffstat (limited to 'src')
-rw-r--r-- | src/preamble.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/preamble.js b/src/preamble.js index d0e83469..3c2da6b3 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -251,7 +251,9 @@ Module["ccall"] = ccall; // Returns the C function with a specified identifier (for C++, you need to do manual name mangling) function getCFunc(ident) { try { - var func = globalScope['Module']['_' + ident]; // closure exported function + try { + var func = globalScope['Module']['_' + ident]; // closure exported function + } catch(e) {} if (!func) func = eval('_' + ident); // explicit lookup } catch(e) { } |