aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jsifier.js2
-rw-r--r--src/preamble.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 486eeb02..2babaa05 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -681,7 +681,7 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
+ makeFunctionCall(item.ident, item.params, item.funcData) + ' '
+ '} catch(e) { '
+ 'if (ABORT) throw e; __THREW__ = true; '
- + (EXCEPTION_DEBUG ? 'print("Exception: " + e + " : " + e.stack + ", currently at: " + (new Error().stack)); ' : '')
+ + (EXCEPTION_DEBUG ? 'print("Exception: " + e + ", currently at: " + (new Error().stack)); ' : '')
+ 'return null } })(); if (!__THREW__) { ' + makeBranch(item.toLabel, item.currLabelId)
+ ' } else { ' + makeBranch(item.unwindLabel, item.currLabelId) + ' }';
return ret;
diff --git a/src/preamble.js b/src/preamble.js
index 408ef6aa..5903a5be 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -482,7 +482,7 @@ function __shutdownRuntime__() {
if (typeof func === 'number') {
func = FUNCTION_TABLE[func];
}
- func(atexit.arg);
+ func(atexit.arg || null);
}
// allow browser to GC, set heaps to null?