diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-18 17:01:01 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-18 17:01:01 -0800 |
commit | 28b3a25d98de7073da8736426c01e3f0c7d12cb2 (patch) | |
tree | a38a50d45e050c9cf17950bd375030c24a90c5e0 | |
parent | d773f2f3cd4f0a35d3853859a8cd81b8d76c277b (diff) |
better fix for closure issue in asm2f.test_exceptions; clear out the spidermonkey shell gc() function
-rw-r--r-- | src/shell.js | 2 | ||||
-rw-r--r-- | tests/test_core.py | 2 |
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 = ''' |