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

Migrate various parts of the bindings code to use roots #55530

Merged
merged 8 commits into from
Jul 14, 2021

Conversation

kg
Copy link
Member

@kg kg commented Jul 12, 2021

We have a lot of code that passes raw pointers to managed objects around when they should really be using roots instead (i.e. root.value) so that if the GC relocates the object, they won't be using the old address. This PR migrates a bunch of that code so that it uses root objects.

A lot of code remains that does use raw objects, but I read over all of it and the cases appear to be safe because they immediately return it (or return it without calling any other functions).

@kg kg requested a review from marek-safar as a code owner July 12, 2021 19:13
@kg kg added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) and removed area-System.Runtime.InteropServices.JavaScript labels Jul 12, 2021
@kg kg requested a review from lewing July 12, 2021 19:13
@lewing
Copy link
Member

lewing commented Jul 13, 2021

failure is #55588

@kg kg merged commit 8d365a0 into dotnet:main Jul 14, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime.InteropServices.JavaScript NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants