File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -602,6 +602,28 @@ jobs:
602602 echo "JS_ENGINES = [JSC_ENGINE]" >> ~/emsdk/.emscripten
603603 - run-tests :
604604 test_targets : " core0.test_hello_world"
605+ test-spidermonkey :
606+ executor : linux-python
607+ steps :
608+ - checkout
609+ - run :
610+ name : submodule update
611+ command : git submodule update --init
612+ - pip-install
613+ - build
614+ - run :
615+ name : install spidermonkey
616+ command : |
617+ cd $HOME
618+ wget https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.xz
619+ tar -xf node-v18.12.0-linux-x64.tar.xz
620+ export PATH="`pwd`/node-v18.12.0-linux-x64/bin:${PATH}"
621+ npm install jsvu -g
622+ jsvu --os=default --engines=spidermonkey
623+ echo "JSC_ENGINE = [os.path.expanduser('~/.jsvu/bin/spidermonkey')]" >> ~/emsdk/.emscripten
624+ echo "JS_ENGINES = [JSC_ENGINE]" >> ~/emsdk/.emscripten
625+ - run-tests :
626+ test_targets : " core0.test_hello_world"
605627 test-node-compat :
606628 # We don't use `bionic` here since its tool old to run recent node versions:
607629 # `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found`
@@ -815,6 +837,7 @@ workflows:
815837 requires :
816838 - build-linux
817839 - test-jsc
840+ - test-spidermonkey
818841 - test-node-compat
819842 - test-windows
820843 - test-mac-arm64
Original file line number Diff line number Diff line change @@ -319,13 +319,18 @@ if (ENVIRONMENT_IS_SHELL) {
319319 } ;
320320
321321 readAsync = ( f , onload , onerror ) = > {
322- setTimeout ( ( ) => onload ( readBinary ( f ) ) , 0 ) ;
322+ setTimeout ( ( ) => onload ( readBinary ( f ) ) ) ;
323323 } ;
324324
325325 if ( typeof clearTimeout == 'undefined' ) {
326326 globalThis . clearTimeout = ( id ) => { } ;
327327 }
328328
329+ if ( typeof setTimeout == 'undefined' ) {
330+ // spidermonkey lacks setTimeout but we use it above in readAsync.
331+ globalThis . setTimeout = ( f ) => ( typeof f == 'function' ) ? f ( ) : abort ( ) ;
332+ }
333+
329334 if ( typeof scriptArgs != 'undefined' ) {
330335 arguments_ = scriptArgs ;
331336 } else if ( typeof arguments != 'undefined' ) {
You can’t perform that action at this time.
0 commit comments