Skip to content

Commit fa53259

Browse files
committed
Add --experimental-wasm-exnref flag to node
Required for the try_table based (exnref) exception handling, for versions before Node 25
1 parent 0d44229 commit fa53259

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

web-image/mx.web-image/mx_web_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
_suite = mx.suite("web-image")
5151

52-
_web_image_js_engine_name = os.getenv("NODE_EXE", "node")
52+
_web_image_js_engine_name = [os.getenv("NODE_EXE", "node"), "--experimental-wasm-exnref"]
5353

5454
# Name of GraalVm component defining the web-image macro
5555
web_image_component = "web-image"
@@ -489,7 +489,7 @@ def __init__(self):
489489
def apply(self, config):
490490
vm_args, main_class, main_class_args = config
491491

492-
vm_args += ["-Dwebimage.test.js=" + _web_image_js_engine_name]
492+
vm_args += ["-Dwebimage.test.js=" + ",".join(_web_image_js_engine_name)]
493493
vm_args += ["-Dwebimage.test.launcher=" + vm_web_image_path()]
494494
vm_args += ["-Dwebimage.test.flags=" + ",".join(get_launcher_flags(WebImageConfiguration.test_cases))]
495495
# If any of the arguments contains spaces and double quotes, on Windows it will add its own quotes around

web-image/src/com.oracle.svm.hosted.webimage.test/src/com/oracle/svm/hosted/webimage/test/util/WebImageTestOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import jdk.graal.compiler.debug.GraalError;
3232

3333
public class WebImageTestOptions {
34-
public static final String JS_CMD = System.getProperty("webimage.test.js");
34+
public static final List<String> JS_CMD = Arrays.asList(System.getProperty("webimage.test.js", ",").split(","));
3535
private static final String LAUNCHER = System.getProperty("webimage.test.launcher");
3636

3737
/**

web-image/src/com.oracle.svm.hosted.webimage.test/src/com/oracle/svm/hosted/webimage/test/util/WebImageTestUtil.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ public static RunResult executeTestProgram(Class<?> c, String[] args, int expect
191191
}
192192

193193
public static RunResult runJS(String cmd, String[] arguments, int expectExitCode) {
194-
List<String> invokeCmd = new ArrayList<>();
195-
invokeCmd.add(WebImageTestOptions.JS_CMD);
194+
List<String> invokeCmd = new ArrayList<>(WebImageTestOptions.JS_CMD);
196195
invokeCmd.add(cmd);
197196

198197
if (arguments != null) {

0 commit comments

Comments
 (0)