Skip to content

Commit

Permalink
fix(ext/ffi): use SafeMap in getTypeSizeAndAlignment (denoland#17305)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garcia committed Jan 15, 2023
1 parent 9830ae8 commit 44d9acc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/ffi/00_ffi.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
PromisePrototypeThen,
MathMax,
MathCeil,
Map,
SafeMap,
SafeArrayIterator,
} = window.__bootstrap.primordials;

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 44d9acc

Please sign in to comment.