From: Fabrice Bellard Date: Thu, 4 Jun 2026 09:03:10 +0000 (+0200) Subject: fixed microbench with d8 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/stylesheets/stylesheet.css?a=commitdiff_plain;h=92a3d4d5ea04c98c462161fb881ee00b78176d73;p=quickjs.git fixed microbench with d8 --- diff --git a/tests/microbench.js b/tests/microbench.js index a9fc5f1..37e6a27 100644 --- a/tests/microbench.js +++ b/tests/microbench.js @@ -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);