From 156fef9ceae212950f7355d5e3ca8d6e4890cfe0 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Thu, 22 Dec 2022 10:54:38 +0900 Subject: fix(ext): Add checks for owning properties in for-in loops (#17139) In the for-in loops, there were a few places where we forgot to check if objects owned some properties, so I added them. --- ext/webidl/00_webidl.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/webidl') diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js index dafade99d..c7825b8a2 100644 --- a/ext/webidl/00_webidl.js +++ b/ext/webidl/00_webidl.js @@ -1013,6 +1013,9 @@ function configurePrototype(prototype) { const descriptors = ObjectGetOwnPropertyDescriptors(prototype.prototype); for (const key in descriptors) { + if (!ObjectPrototypeHasOwnProperty(descriptors, key)) { + continue; + } if (key === "constructor") continue; const descriptor = descriptors[key]; if ( -- cgit v1.2.3