Remove `readonly` from GCHandle field on Gen2GcCallback (dotnet/coreclr#26509)
authorStephen Toub <stoub@microsoft.com>
Wed, 4 Sep 2019 15:58:36 +0000 (11:58 -0400)
committerJan Kotas <jkotas@microsoft.com>
Wed, 4 Sep 2019 15:58:36 +0000 (08:58 -0700)
commit1d5fa6ad91391c38b11c5e0490f737ce762200bf
treeca614d9fea6b56f336b00c56f3b25ae04fe6768c
parent3b2173d93ac06f96219fa71abdb2fb8255d6c9d6
Remove `readonly` from GCHandle field on Gen2GcCallback (dotnet/coreclr#26509)

GCHandle is mutable, and this type does call Free on the handle, but with it marked as readonly, the mutations performed by Free will be done on a copy rather than on the original.

Commit migrated from https://github.com/dotnet/coreclr/commit/85bec20cfeed5d364f7298d94fa37ca11f0accff
src/libraries/System.Private.CoreLib/src/System/Gen2GcCallback.cs