diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-07-04 00:17:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 00:17:52 +0200 |
commit | 5addba2abc2e384e751e8884b4ac3219688c2473 (patch) | |
tree | a5249a82092909f32a852a910e5e144ddeffa497 /runtime/js/40_process.js | |
parent | ffa75be48044255ed49a822a7a61a2a130123a4a (diff) |
refactor: use primordials in runtime/, part2 (#11248)
Diffstat (limited to 'runtime/js/40_process.js')
-rw-r--r-- | runtime/js/40_process.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 91e37701a..70a590f36 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -6,6 +6,13 @@ const { File } = window.__bootstrap.files; const { readAll } = window.__bootstrap.io; const { assert, pathFromURL } = window.__bootstrap.util; + const { + ArrayPrototypeMap, + TypeError, + isNaN, + ObjectEntries, + String, + } = window.__bootstrap.primordials; function opKill(pid, signo) { core.opSync("op_kill", { pid, signo }); @@ -102,9 +109,9 @@ cmd[0] = pathFromURL(cmd[0]); } const res = opRun({ - cmd: cmd.map(String), + cmd: ArrayPrototypeMap(cmd, String), cwd, - env: Object.entries(env), + env: ObjectEntries(env), stdin: isRid(stdin) ? "" : stdin, stdout: isRid(stdout) ? "" : stdout, stderr: isRid(stderr) ? "" : stderr, |