Extract logic for checking whether a property defined in a class should be left
to be handled by its base class via the prototype chain or not. Apply the same
logic when collecting own property names and exclude them if needed.
[x] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
Properties that are hidden from derived classes are still reported by Object.getOwnPropertyNames. I.e.
Object.getOwnPropertyDescriptor could return undefined for some of the properties returned
by Object.getOwnPropertyNames.
What is the new behavior?
Properties that are hidden from derived classes are omitted by Object.getOwnPropertyNames as well.
Extract logic for checking whether a property defined in a class should be left to be handled by its base class via the prototype chain or not. Apply the same logic when collecting own property names and exclude them if needed.
PR Checklist
What is the current behavior?
Properties that are hidden from derived classes are still reported by
Object.getOwnPropertyNames
. I.e.Object.getOwnPropertyDescriptor
could returnundefined
for some of the properties returned byObject.getOwnPropertyNames
.What is the new behavior?
Properties that are hidden from derived classes are omitted by
Object.getOwnPropertyNames
as well.regressed after #1226