summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/child_process.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2024-02-05 14:28:28 +0900
committerGitHub <noreply@github.com>2024-02-05 14:28:28 +0900
commit961fa27c769452a5ef233994886f5a9be9690773 (patch)
tree3441284cc27d6af4ba5934d1744c610b90b955de /ext/node/polyfills/child_process.ts
parent56f58a047e3c1cc27ff55988f25173cc18ef6aeb (diff)
fix(ext/node): fix timeout param validation in cp.execFile (#22262)
Diffstat (limited to 'ext/node/polyfills/child_process.ts')
-rw-r--r--ext/node/polyfills/child_process.ts10
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/node/polyfills/child_process.ts b/ext/node/polyfills/child_process.ts
index 2182361e9..46a19983d 100644
--- a/ext/node/polyfills/child_process.ts
+++ b/ext/node/polyfills/child_process.ts
@@ -436,15 +436,7 @@ export function execFile(
shell: false,
...options,
};
- if (!Number.isInteger(execOptions.timeout) || execOptions.timeout < 0) {
- // In Node source, the first argument to error constructor is "timeout" instead of "options.timeout".
- // timeout is indeed a member of options object.
- throw new ERR_OUT_OF_RANGE(
- "timeout",
- "an unsigned integer",
- execOptions.timeout,
- );
- }
+ validateTimeout(execOptions.timeout);
if (execOptions.maxBuffer < 0) {
throw new ERR_OUT_OF_RANGE(
"options.maxBuffer",