From 515a34b4de222e35c7ade1b92614d746e73d4c2e Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Thu, 11 Jan 2024 07:37:25 +0900 Subject: refactor: use `core.ensureFastOps()` (#21888) --- ext/node/polyfills/internal_binding/constants.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ext/node/polyfills/internal_binding/constants.ts') diff --git a/ext/node/polyfills/internal_binding/constants.ts b/ext/node/polyfills/internal_binding/constants.ts index 69a2dffeb..4a6a90608 100644 --- a/ext/node/polyfills/internal_binding/constants.ts +++ b/ext/node/polyfills/internal_binding/constants.ts @@ -1,4 +1,10 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +import { core } from "ext:core/mod.js"; +const { + op_node_build_os, +} = core.ensureFastOps(true); + let os: { dlopen: { RTLD_DEEPBIND?: number; @@ -196,8 +202,7 @@ let os: { UV_UDP_REUSEADDR: number; }; -const core = globalThis.__bootstrap.core; -const buildOs = core.ops.op_node_build_os(); +const buildOs = op_node_build_os(); if (buildOs === "darwin") { os = { UV_UDP_REUSEADDR: 4, -- cgit v1.2.3