diff options
Diffstat (limited to 'ext/node/polyfills/internal/crypto/_randomFill.mjs')
-rw-r--r-- | ext/node/polyfills/internal/crypto/_randomFill.mjs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/crypto/_randomFill.mjs b/ext/node/polyfills/internal/crypto/_randomFill.mjs index 6afc654b4..7f66cfb4b 100644 --- a/ext/node/polyfills/internal/crypto/_randomFill.mjs +++ b/ext/node/polyfills/internal/crypto/_randomFill.mjs @@ -11,6 +11,9 @@ import { isAnyArrayBuffer, isArrayBufferView } from "node:util/types"; import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts"; const { core } = globalThis.__bootstrap; const { ops } = core; +const { + op_node_generate_secret_async, +} = core.ensureFastOps(); const kBufferMaxLength = 0x7fffffff; @@ -52,7 +55,7 @@ export default function randomFill( assertOffset(offset, buf.length); assertSize(size, offset, buf.length); - core.opAsync("op_node_generate_secret_async", Math.floor(size)) + op_node_generate_secret_async(Math.floor(size)) .then( (randomData) => { const randomBuf = Buffer.from(randomData.buffer); |