diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-17 11:14:58 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-17 11:14:58 -0700 |
commit | 99da1340487738c286fbc38f55dbc23aa9c3233a (patch) | |
tree | b708a63b5cd874cea2a069fa8444c92e94f9cf4d /src | |
parent | ed40b36281285c39011240c16459d12c7acec9f7 (diff) |
fix closure issues with exception handling, and add test coverage
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 4 | ||||
-rw-r--r-- | src/shell.js | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js index 3dbf738d..c491f078 100644 --- a/src/library.js +++ b/src/library.js @@ -4587,12 +4587,12 @@ LibraryManager.library = { // return the type of the catch block which should be called. for (var i = 0; i < typeArray.length; i++) { if (___cxa_does_inherit(typeArray[i], throwntype, thrown)) - return { 'f0':thrown, 'f1':typeArray[i]}; + return { f0:thrown, f1:typeArray[i] }; } // Shouldn't happen unless we have bogus data in typeArray // or encounter a type for which emscripten doesn't have suitable // typeinfo defined. Best-efforts match just in case. - return {'f0':thrown,'f1':throwntype}; + return { f0:thrown, f1 :throwntype }; }, // Recursively walks up the base types of 'possibilityType' diff --git a/src/shell.js b/src/shell.js index ab54c284..e48be3b0 100644 --- a/src/shell.js +++ b/src/shell.js @@ -115,6 +115,10 @@ if (!Module['arguments']) { } // *** Environment setup code *** +// Closure helpers +Module.print = Module['print']; +Module.printErr = Module['printErr']; + {{BODY}} // {{MODULE_ADDITIONS}} |