summaryrefslogtreecommitdiff
path: root/ext/webidl/00_webidl.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-05-02 19:15:45 +0900
committerGitHub <noreply@github.com>2023-05-02 12:15:45 +0200
commit49eb887cc6325e14211ec4a241ffc4ac98f0f7a9 (patch)
tree8dec27c42c45b8e0bfaa7d4b886546fbdc942b64 /ext/webidl/00_webidl.js
parentcf893741c3206f55eaac1999f50f1018122f7b85 (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/webidl/00_webidl.js')
-rw-r--r--ext/webidl/00_webidl.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js
index 71b7982b7..247ebfe0d 100644
--- a/ext/webidl/00_webidl.js
+++ b/ext/webidl/00_webidl.js
@@ -47,7 +47,7 @@ const {
ObjectGetOwnPropertyDescriptor,
ObjectGetOwnPropertyDescriptors,
ObjectGetPrototypeOf,
- ObjectPrototypeHasOwnProperty,
+ ObjectHasOwn,
ObjectPrototypeIsPrototypeOf,
ObjectIs,
PromisePrototypeThen,
@@ -920,7 +920,7 @@ function createRecordConverter(keyConverter, valueConverter) {
// Fast path for common case (not a Proxy)
if (!core.isProxy(V)) {
for (const key in V) {
- if (!ObjectPrototypeHasOwnProperty(V, key)) {
+ if (!ObjectHasOwn(V, key)) {
continue;
}
const typedKey = keyConverter(key, prefix, context, opts);
@@ -1133,7 +1133,7 @@ function mixinPairIterable(name, prototype, dataSymbol, keyKey, valueKey) {
function configurePrototype(prototype) {
const descriptors = ObjectGetOwnPropertyDescriptors(prototype.prototype);
for (const key in descriptors) {
- if (!ObjectPrototypeHasOwnProperty(descriptors, key)) {
+ if (!ObjectHasOwn(descriptors, key)) {
continue;
}
if (key === "constructor") continue;