diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2022-12-20 11:37:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 03:37:50 +0100 |
commit | 948f85216a15e4ef489af21bb532a9b201b0364c (patch) | |
tree | 35c2bbfa021cf9a4190ab803ed091c5547bfe9f4 /ext/ffi/00_ffi.js | |
parent | 2ac575abfb75dc4533306c80240cb1beeb816b9b (diff) |
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r-- | ext/ffi/00_ffi.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index 1b340a766..2dc6bb5e0 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -6,18 +6,20 @@ const ops = core.ops; const __bootstrap = window.__bootstrap; const { - ObjectDefineProperty, ArrayPrototypeMap, - Number, - NumberIsSafeInteger, ArrayPrototypeJoin, + ObjectDefineProperty, + ObjectPrototypeHasOwnProperty, ObjectPrototypeIsPrototypeOf, + Number, + NumberIsSafeInteger, TypeError, Int32Array, Uint32Array, BigInt64Array, BigUint64Array, Function, + ReflectHas, } = window.__bootstrap.primordials; const U32_BUFFER = new Uint32Array(2); @@ -273,7 +275,11 @@ constructor(path, symbols) { [this.#rid, this.symbols] = ops.op_ffi_load({ path, symbols }); for (const symbol in symbols) { - if ("type" in symbols[symbol]) { + if (!ObjectPrototypeHasOwnProperty(symbols, symbol)) { + continue; + } + + if (ReflectHas(symbols[symbol], "type")) { const type = symbols[symbol].type; if (type === "void") { throw new TypeError( |