Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

[WIP] Remove in property checking for ObjectValues - fixes 2510 #2512

Closed
wants to merge 5 commits into from

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Aug 30, 2018

Release notes: fixes potential issues with our Babel 7 transform internally

This PR is to address the issues outlined in #2510 in regards to ObjectValue and the usage through the Prepack codebase for where we use in to check for property existence. This changes that usage to explicit undefined checks due to our internal Babel transform compiling to output that is not compatible with in checks. Fixes #2510

O instanceof ObjectValue && "$ViewedArrayBuffer" in O,
"O is an Object that has a [[ViewedArrayBuffer]] internal slot"
);
// Update: [[ViewedArrayBuffer]] will always be an internal slot, see #2512
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this comment.

@trueadm
Copy link
Contributor Author

trueadm commented Aug 31, 2018

I'll take another look at this PR next week. @sebmarkbage would be good if you could see what I'm doing wrong here, it seems defining these properties on the ObjectValue instance causes the 262 tests to fail, so it might be that I've missed a codesite where in is being used on ObjectValue still. I'm going to focus on getting your other PR landed first.

@trueadm trueadm changed the title Remove in property checking for ObjectValues - fixes 2510 [WIP] Remove in property checking for ObjectValues - fixes 2510 Aug 31, 2018
@trueadm trueadm added the WIP This pull request is a work in progress and not ready for merging. label Aug 31, 2018
@trueadm trueadm closed this Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed WIP This pull request is a work in progress and not ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ObjectValue has optional fields which isn't supported
3 participants