diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-05-02 19:15:45 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 12:15:45 +0200 |
commit | 49eb887cc6325e14211ec4a241ffc4ac98f0f7a9 (patch) | |
tree | 8dec27c42c45b8e0bfaa7d4b886546fbdc942b64 /ext/ffi/00_ffi.js | |
parent | cf893741c3206f55eaac1999f50f1018122f7b85 (diff) |
refactor(core): Use `ObjectHasOwn` instead of `ObjectPrototypeHasOwnProperty` (#18952)
ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r-- | ext/ffi/00_ffi.js | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |