diff options
Diffstat (limited to 'ext/node/polyfills/internal/child_process.ts')
-rw-r--r-- | ext/node/polyfills/internal/child_process.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 39c7633e4..7f40ce94b 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -43,8 +43,11 @@ import { import { kEmptyObject } from "ext:deno_node/internal/util.mjs"; import { getValidatedPath } from "ext:deno_node/internal/fs/utils.mjs"; import process from "node:process"; - const core = globalThis.__bootstrap.core; +const { + op_node_ipc_read, + op_node_ipc_write, +} = core.ensureFastOps(); export function mapValues<T, O>( record: Readonly<Record<string, T>>, @@ -1079,7 +1082,7 @@ export function setupChannel(target, ipc) { if (!target.connected || target.killed) { return; } - const msg = await core.opAsync("op_node_ipc_read", ipc); + const msg = await op_node_ipc_read(ipc); if (msg == null) { // Channel closed. target.disconnect(); @@ -1124,7 +1127,7 @@ export function setupChannel(target, ipc) { notImplemented("ChildProcess.send with handle"); } - core.opAsync("op_node_ipc_write", ipc, message) + op_node_ipc_write(ipc, message) .then(() => { if (callback) { process.nextTick(callback, null); |