aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shell.js2
-rw-r--r--tests/test_core.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/shell.js b/src/shell.js
index b68e16d9..b41fbb51 100644
--- a/src/shell.js
+++ b/src/shell.js
@@ -91,6 +91,8 @@ else if (ENVIRONMENT_IS_SHELL) {
}
this['{{{ EXPORT_NAME }}}'] = Module;
+
+ eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined"); // wipe out the SpiderMonkey shell 'gc' function, which can confuse closure (uses it as a minified name, and it is then initted to a non-falsey value unexpectedly)
}
else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
Module['read'] = function read(url) {
diff --git a/tests/test_core.py b/tests/test_core.py
index 1803c926..67e316e4 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -2631,7 +2631,7 @@ back
Settings.EXCEPTION_DEBUG = 1
Settings.DISABLE_EXCEPTION_CATCHING = 0
- if '-O2' in self.emcc_args and self.run_name != 'asm2f': # XXX closure problem with asm2f
+ if '-O2' in self.emcc_args:
self.emcc_args += ['--closure', '1'] # Use closure here for some additional coverage
src = '''