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:
602
602
echo "JS_ENGINES = [JSC_ENGINE]" >> ~/emsdk/.emscripten
603
603
- run-tests :
604
604
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"
605
627
test-node-compat :
606
628
# We don't use `bionic` here since its tool old to run recent node versions:
607
629
# `/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found`
@@ -815,6 +837,7 @@ workflows:
815
837
requires :
816
838
- build-linux
817
839
- test-jsc
840
+ - test-spidermonkey
818
841
- test-node-compat
819
842
- test-windows
820
843
- test-mac-arm64
Original file line number Diff line number Diff line change @@ -319,13 +319,18 @@ if (ENVIRONMENT_IS_SHELL) {
319
319
} ;
320
320
321
321
readAsync = ( f , onload , onerror ) = > {
322
- setTimeout ( ( ) => onload ( readBinary ( f ) ) , 0 ) ;
322
+ setTimeout ( ( ) => onload ( readBinary ( f ) ) ) ;
323
323
} ;
324
324
325
325
if ( typeof clearTimeout == 'undefined' ) {
326
326
globalThis . clearTimeout = ( id ) => { } ;
327
327
}
328
328
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
+
329
334
if ( typeof scriptArgs != 'undefined' ) {
330
335
arguments_ = scriptArgs ;
331
336
} else if ( typeof arguments != 'undefined' ) {
You can’t perform that action at this time.
0 commit comments