Handles Object Prototype Methods in Proxy #4039
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
valueOfwould point to the data object methodvalueOfwhile the previous behavior would be thewindow.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