From 49eb887cc6325e14211ec4a241ffc4ac98f0f7a9 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Tue, 2 May 2023 19:15:45 +0900 Subject: refactor(core): Use `ObjectHasOwn` instead of `ObjectPrototypeHasOwnProperty` (#18952) ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it. --- ext/ffi/00_ffi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/ffi') diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index f36690226..2091a55b3 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -10,7 +10,7 @@ const { ArrayPrototypeJoin, DataViewPrototypeGetByteLength, ObjectDefineProperty, - ObjectPrototypeHasOwnProperty, + ObjectHasOwn, ObjectPrototypeIsPrototypeOf, Number, NumberIsSafeInteger, @@ -439,7 +439,7 @@ class DynamicLibrary { constructor(path, symbols) { ({ 0: this.#rid, 1: this.symbols } = ops.op_ffi_load({ path, symbols })); for (const symbol in symbols) { - if (!ObjectPrototypeHasOwnProperty(symbols, symbol)) { + if (!ObjectHasOwn(symbols, symbol)) { continue; } -- cgit v1.2.3