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) --- core/01_core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/01_core.js b/core/01_core.js index 6231c0766..a2cd9e14b 100644 --- a/core/01_core.js +++ b/core/01_core.js @@ -9,7 +9,6 @@ ArrayPrototypePush, Error, ErrorCaptureStackTrace, - Map, MapPrototypeDelete, MapPrototypeGet, MapPrototypeHas, @@ -22,6 +21,7 @@ RangeError, ReferenceError, SafeArrayIterator, + SafeMap, SafePromisePrototypeFinally, setQueueMicrotask, StringPrototypeSlice, @@ -65,7 +65,7 @@ registerErrorClass("URIError", URIError); let nextPromiseId = 1; - const promiseMap = new Map(); + const promiseMap = new SafeMap(); const RING_SIZE = 4 * 1024; const NO_PROMISE = null; // Alias to null is faster than plain nulls const promiseRing = ArrayPrototypeFill(new Array(RING_SIZE), NO_PROMISE); @@ -74,7 +74,7 @@ const promiseIdSymbol = SymbolFor("Deno.core.internalPromiseId"); let opCallTracingEnabled = false; - const opCallTraces = new Map(); + const opCallTraces = new SafeMap(); function enableOpCallTracing() { opCallTracingEnabled = true; -- cgit v1.2.3