summaryrefslogtreecommitdiff
path: root/ext/webidl/00_webidl.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2022-12-22 10:54:38 +0900
committerGitHub <noreply@github.com>2022-12-22 02:54:38 +0100
commit156fef9ceae212950f7355d5e3ca8d6e4890cfe0 (patch)
treee6e43986c639cb09f6bab02380d760a72db575ff /ext/webidl/00_webidl.js
parent4258e06f87f33e1cbf434f5040fc8dfabe254c12 (diff)
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.
Diffstat (limited to 'ext/webidl/00_webidl.js')
-rw-r--r--ext/webidl/00_webidl.js3
1 files changed, 3 insertions, 0 deletions
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 (