1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

fix(ext/ffi): use SafeMap in getTypeSizeAndAlignment (#17305)

This commit is contained in:
Garcia 2023-01-14 22:42:52 -08:00 committed by GitHub
parent 9830ae8297
commit 44d9acca75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {