fixed microbench with d8

This commit is contained in:
Fabrice Bellard 2026-06-04 11:03:10 +02:00
parent 8e97f24044
commit 92a3d4d5ea

@ -1577,8 +1577,14 @@ function main(argc, argv, g)
}
if (typeof scriptArgs === "undefined") {
scriptArgs = [];
if (typeof process.argv === "object")
if (typeof process !== "undefined" && typeof process.argv === "object") {
/* node case */
scriptArgs = process.argv.slice(1);
} else if (typeof arguments !== "undefined") {
/* d8 case */
scriptArgs = arguments;
} else {
scriptArgs = [];
}
}
main(scriptArgs.length, scriptArgs, this);