This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Fix ProjectN test regressions - #1393
Merged
Merged
Conversation
jkotas
pushed a commit
that referenced
this pull request
Jun 14, 2017
…et_Target. CR: JKotas, FadiM, DavidWr At some moment the CallConverterThunk code took dependency on the blittable check missing in GCHandle.set_Target (change 1566458), so we had to place that check under "#if CORERT" (#1393). This change enables the check and introduces the UnsafeGCHandle structure to use in the CallConverterThunk code. UnsafeGCHandle is a faster version of the GCHandle structure with the following differences: * The constructor assumes the handle type is valid; no range check is performed. * The pinned flag is not stored in the _handle field. * The Target getter and setter assume the UnsafeGCHandle has been allocated. * No blittable check is performed when allocating a pinned UnsafeGCHandle or setting its target. * The GetRawTargetAddress method returns the raw address of the target (the pointer to its m_pEEType field). * The Free method is not thread-safe and does not throw if the UnsafeGCHandle has not been allocated or has been already freed. Also avoid the native runtime call in release builds in the RuntimeImports.RhHandleGet method and Runtime.Base's version of the UnsafeGCHandle.get_Target method (in debug builds the runtime performs additional checks). [tfs-changeset: 1661633]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.