Skip to content

Conversation

@ekwoka
Copy link
Contributor

@ekwoka ekwoka commented Feb 17, 2024

Continuation of #4038

This addresses a potential issue that may arise (and then another issue that fix may lead to).

These "fixes" are more for posterities sake, as these becoming issues hinges on #4038 being merged, but also the likelihood of them being issues is quite small.

This can just be in draft (or even closed) for history sake if those issues do come to fruition.

Basically, #4038 would expose prototype methods to the Proxy used for expressions, so expressions like valueOf would point to the data object method valueOf while the previous behavior would be the window.valueOf.

This checks if the things being accessed is an Object.prototype method and skips it, but to allow someones own object to use those same names, we check if the object has that name itself.

These seem like low likelihood/low impact issues, but are logical results of #4038

@ekwoka ekwoka force-pushed the bug/handle-object-prorotype-methods branch from 5c3ecc7 to e6460ac Compare February 17, 2024 18:08
@calebporzio
Copy link
Collaborator

Thanks for this. I'll close this for now and we can return to it if issues arise. Thanks @ekwoka for the great explanation.

@calebporzio calebporzio closed this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants