Skip to content

Commit 411e628

Browse files
committed
Merge pull request #2291 from juj/spidermonkey_none
spidermonkey_none
2 parents 55b5c4b + 96a1da2 commit 411e628

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

tests/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2983,7 +2983,7 @@ def test_dlfcn_qsort(self):
29832983
output_nicerizer=lambda x, err: x.replace('\n', '*'),
29842984
post_build=self.dlfcn_post_build)
29852985

2986-
if Settings.ASM_JS and os.path.exists(SPIDERMONKEY_ENGINE[0]):
2986+
if Settings.ASM_JS and SPIDERMONKEY_ENGINE and os.path.exists(SPIDERMONKEY_ENGINE[0]):
29872987
out = run_js('liblib.so', engine=SPIDERMONKEY_ENGINE, full_output=True, stderr=STDOUT)
29882988
if 'asm' in out:
29892989
self.validate_asmjs(out)

tools/shared.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -746,13 +746,14 @@ def include_directive(paths):
746746
# Engine tweaks
747747

748748
try:
749-
new_spidermonkey = listify(SPIDERMONKEY_ENGINE)
750-
if 'gcparam' not in str(new_spidermonkey):
751-
new_spidermonkey += ['-e', "gcparam('maxBytes', 1024*1024*1024);"] # Our very large files need lots of gc heap
752-
if '-w' not in str(new_spidermonkey):
753-
new_spidermonkey += ['-w']
754-
JS_ENGINES = map(lambda x: new_spidermonkey if x == SPIDERMONKEY_ENGINE else x, JS_ENGINES)
755-
SPIDERMONKEY_ENGINE = new_spidermonkey
749+
if SPIDERMONKEY_ENGINE:
750+
new_spidermonkey = listify(SPIDERMONKEY_ENGINE)
751+
if 'gcparam' not in str(new_spidermonkey):
752+
new_spidermonkey += ['-e', "gcparam('maxBytes', 1024*1024*1024);"] # Our very large files need lots of gc heap
753+
if '-w' not in str(new_spidermonkey):
754+
new_spidermonkey += ['-w']
755+
JS_ENGINES = map(lambda x: new_spidermonkey if x == SPIDERMONKEY_ENGINE else x, JS_ENGINES)
756+
SPIDERMONKEY_ENGINE = new_spidermonkey
756757
except NameError:
757758
pass
758759

0 commit comments

Comments
 (0)