Skip to content

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