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

Rename GetPrototype() uses to GetPrototypeV2() #2872

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Oct 9, 2024

This is expected to be relatively temporary. V8 is in the process of deprecating and removing the original GetPrototype() implementation. Once that original impl is removed, I believe the plan is to rename GetPrototypeV2() back to GetPrototype(), at which point we'll likely need to change these back. That's ok, we want to make sure there's no issue with updating to the new behavior well in advance of that.

This is expected to be relatively temporary. V8 is in the process of
deprecating and removing the original `GetPrototype()` implementation.
Once that original impl is removed, I believe the plan is to rename
`GetPrototypeV2()` back to `GetPrototype()`, at which point we'll
likely need to change these back. That's ok, we want to make sure
there's no issue with updating to the new behavior well in advance
of that.
@jasnell jasnell requested review from a team as code owners October 9, 2024 14:41
@erikcorry
Copy link
Contributor

Apparently there is some subtle difference between the two calls if we are calling it on the global object.

I didn't understand that, but assuming that we understand that, LGTM.

Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

looks good to me. i tried to do a similar research to address @erikcorry's comments, but if we are in par, let's go!

@jasnell
Copy link
Member Author

jasnell commented Oct 9, 2024

In neither of these cases would it really be expected that someone would be passing the globalThis so I think we're likely safe. That said, it's worth keeping an eye on.

@jasnell jasnell merged commit 1a16a2a into main Oct 9, 2024
13 checks passed
@jasnell jasnell deleted the jsnell/squelch-v8-deprecation-warning branch October 9, 2024 16:07
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.

3 participants