Skip to content

Fix error with getObject on a ClassRef #1326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 21, 2021
Merged

Fix error with getObject on a ClassRef #1326

merged 3 commits into from
May 21, 2021

Conversation

grouma
Copy link
Member

@grouma grouma commented May 21, 2021

Object.getOwnPropertyNames returns setters, getters and functions. We don't need to filter this list besides the constructor. Before this change calling proto[method[i]] could cause a runtime issue as we were actually calling the getter or setter.

@grouma grouma requested a review from nshahan May 21, 2021 01:59
@google-cla google-cla bot added the cla: yes label May 21, 2021
Copy link
Contributor

@nshahan nshahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for stepping through the change with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants