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.
This commit is contained in:
Kenta Moriuchi 2022-12-22 10:54:38 +09:00 committed by GitHub
parent 4258e06f87
commit 156fef9cea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -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 (