Commit 382a273
authored
[EH] Simplify supported node version logic (#18654)
According to https://webassembly.org/roadmap/, Wasm EH is enabled by
default, i.e., not behind a flag, as of v17.0.
Also I found v16 has problems even with `--experimenal-wasm-eh`. I
think its implementation of `WebAssembly.Exception` JS API has changed
in the meantime, and because our library_exception.js uses
`WebAssembly.Exception` JS API in some cases:
https://github.com/emscripten-core/emscripten/blob/0481237d73b7de6e41975d3da831ad6899d00b7c/src/library_exceptions.js#L413
This errors out with v16:
```console
aheejin@aheejin:~/test/stack$ ~/apps/node-v16.9.1/node --experimental-wasm-eh ex.js
/usr/local/google/home/aheejin/test/stack/ex.js:137
throw ex;
^
TypeError: WebAssembly.Exception(): Argument 0 must be an exception type with 'parameters'
at ___throw_exception_with_stack_trace (/usr/local/google/home/aheejin/test/stack/ex.js:1314:15)
at <anonymous>:wasm-function[1660]:0x23f98
at <anonymous>:wasm-function[13]:0x1557
at <anonymous>:wasm-function[19]:0x1884
at /usr/local/google/home/aheejin/test/stack/ex.js:895:22
at callMain (/usr/local/google/home/aheejin/test/stack/ex.js:4703:15)
at doRun (/usr/local/google/home/aheejin/test/stack/ex.js:4756:23)
at run (/usr/local/google/home/aheejin/test/stack/ex.js:4771:5)
at runCaller (/usr/local/google/home/aheejin/test/stack/ex.js:4688:19)
at removeRunDependency (/usr/local/google/home/aheejin/test/stack/ex.js:829:7)
```
I think it is the safest to just enable node after v17.1 parent 0481237 commit 382a273
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
498 | 498 | | |
499 | | - | |
500 | | - | |
501 | 499 | | |
502 | 500 | | |
503 | 501 | | |
| |||
0 commit comments