mirror of
https://github.com/bellard/quickjs.git
synced 2026-06-07 06:32:08 +00:00
fixed microbench with d8
This commit is contained in:
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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user