aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library.js4
-rw-r--r--src/shell.js4
-rwxr-xr-xtests/runner.py5
3 files changed, 11 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}}
diff --git a/tests/runner.py b/tests/runner.py
index a6e65d20..30078a9e 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1630,6 +1630,9 @@ m_divisor is 1091269979
if self.emcc_args is None:
if Building.LLVM_OPTS: return self.skip('optimizing bitcode before emcc can confuse libcxx inclusion')
self.emcc_args = [] # libc++ auto-inclusion is only done if we use emcc
+ else:
+ if '-O2' in self.emcc_args:
+ self.emcc_args += ['--closure', '1'] # Use closure here for some additional coverage
src = '''
#include <stdio.h>
@@ -1710,6 +1713,8 @@ m_divisor is 1091269979
def test_uncaught_exception(self):
if self.emcc_args is None: return self.skip('no libcxx inclusion without emcc')
+ if '-O2' in self.emcc_args:
+ self.emcc_args += ['--closure', '1'] # Use closure here for some additional coverage
Settings.EXCEPTION_DEBUG = 0 # Messes up expected output.
Settings.DISABLE_EXCEPTION_CATCHING = 0