From f086ec57b453fc0af763564eb80fea4b5b7f7296 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Sat, 15 Apr 2023 05:23:28 +0900 Subject: fix(core): Use safe primordials wrappers (#18687) --- ext/ffi/00_ffi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/ffi') diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index a8f05dfca..f36690226 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -30,8 +30,8 @@ const { MathCeil, SafeMap, SafeArrayIterator, + SafeWeakMap, SymbolFor, - WeakMap, } = primordials; import { pathFromURL } from "ext:deno_web/00_infra.js"; @@ -204,7 +204,7 @@ const OUT_BUFFER = new Uint32Array(2); const OUT_BUFFER_64 = new BigInt64Array( TypedArrayPrototypeGetBuffer(OUT_BUFFER), ); -const POINTER_TO_BUFFER_WEAK_MAP = new WeakMap(); +const POINTER_TO_BUFFER_WEAK_MAP = new SafeWeakMap(); class UnsafePointer { static create(value) { return ops.op_ffi_ptr_create(value); -- cgit v1.2.3