Skip to content
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

Fix bug in comparison logic of object property #22348

Closed
wants to merge 1 commit into from
Closed

Fix bug in comparison logic of object property #22348

wants to merge 1 commit into from

Conversation

vreality64
Copy link
Contributor

instance.hasOwnProperty has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable.

This PR is solution of #22308 issue. (Fixes #22308)

Test Plan:

It was tested on latest local version of react native project with test, test-ci scripts. In addition to, Object.create(null) was tested and works well. Another test doesn't seems to be necessary.

Changelog:

[General] [Fixed] - Fix object comparison be more reliable

`instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable. #22308
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 19, 2018
@pull-bot
Copy link

Warnings
⚠️

📋 Release Notes - This PR appears to be missing Release Notes.

Generated by 🚫 dangerJS

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Dec 5, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

@vreality64 merged commit c3b3eb7 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Dec 5, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 5, 2018
kelset pushed a commit that referenced this pull request Dec 12, 2018
Summary:
`instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable.

This PR is solution of #22308 issue. (Fixes #22308)
Pull Request resolved: #22348

Differential Revision: D13334882

Pulled By: cpojer

fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
grabbou pushed a commit that referenced this pull request Dec 17, 2018
Summary:
`instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable.

This PR is solution of #22308 issue. (Fixes #22308)
Pull Request resolved: #22348

Differential Revision: D13334882

Pulled By: cpojer

fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
`instance.hasOwnProperty` has potential danger because of some object could be eliminate own prototype chain. Update code be more reliable.

This PR is solution of facebook#22308 issue. (Fixes facebook#22308)
Pull Request resolved: facebook#22348

Differential Revision: D13334882

Pulled By: cpojer

fbshipit-source-id: 9b9310a972e933af1962666d7b0c683ff43cc5b2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mergeInto show console warning about pure object
5 participants