From 6da958d7ec31f2ffd21bb2beb8cc193a62afc55c Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Tue, 17 Jan 2023 01:17:18 +0900 Subject: chore: update dlint to v0.37.0 for GitHub Actions (#17295) Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes: * fix(prefer-primordials): Stop using array pattern assignments * fix(prefer-primordials): Stop using global intrinsics except for `SharedArrayBuffer` * feat(guard-for-in): Apply new guard-for-in rule --- ext/ffi/00_ffi.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ext/ffi/00_ffi.js') diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index 359b10b45..ce2e72370 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -268,7 +268,10 @@ let size = 0; let alignment = 1; for (const field of new SafeArrayIterator(type.struct)) { - const [fieldSize, fieldAlign] = getTypeSizeAndAlignment(field, cache); + const { 0: fieldSize, 1: fieldAlign } = getTypeSizeAndAlignment( + field, + cache, + ); alignment = MathMax(alignment, fieldAlign); size = MathCeil(size / fieldAlign) * fieldAlign; size += fieldSize; @@ -319,7 +322,7 @@ "Invalid UnsafeCallback, cannot be nonblocking", ); } - const [rid, pointer] = ops.op_ffi_unsafe_callback_create( + const { 0: rid, 1: pointer } = ops.op_ffi_unsafe_callback_create( definition, callback, ); @@ -362,7 +365,7 @@ symbols = {}; constructor(path, symbols) { - [this.#rid, this.symbols] = ops.op_ffi_load({ path, symbols }); + ({ 0: this.#rid, 1: this.symbols } = ops.op_ffi_load({ path, symbols })); for (const symbol in symbols) { if (!ObjectPrototypeHasOwnProperty(symbols, symbol)) { continue; -- cgit v1.2.3