summaryrefslogtreecommitdiff
path: root/ext/ffi/00_ffi.js
diff options
context:
space:
mode:
authorGarcia <phosra@tutanota.com>2023-01-14 22:42:52 -0800
committerGitHub <noreply@github.com>2023-01-15 06:42:52 +0000
commit44d9acca75b5a0aa886bf370cd4658bfb6e7097e (patch)
treee2efa4569470e14e8f3d4d6e5816eb3cc920aac8 /ext/ffi/00_ffi.js
parent9830ae82974878da8c4c4dbb34bf3a2076a82547 (diff)
fix(ext/ffi): use SafeMap in getTypeSizeAndAlignment (#17305)
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r--ext/ffi/00_ffi.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js
index 5ebd3f96c..359b10b45 100644
--- a/ext/ffi/00_ffi.js
+++ b/ext/ffi/00_ffi.js
@@ -24,7 +24,7 @@
PromisePrototypeThen,
MathMax,
MathCeil,
- Map,
+ SafeMap,
SafeArrayIterator,
} = window.__bootstrap.primordials;
@@ -255,7 +255,7 @@
typeof type.struct === "object";
}
- function getTypeSizeAndAlignment(type, cache = new Map()) {
+ function getTypeSizeAndAlignment(type, cache = new SafeMap()) {
if (isStruct(type)) {
const cached = cache.get(type);
if (cached !== undefined) {