Skip to content

Conversation

davidwrighton
Copy link
Member

In the past these were used as part of much more elaborate transparency and such checks, but we don't do that anymore.

@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 18:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes unused parameters from access control checking methods in the CoreCLR runtime. The changes eliminate parameters that were previously used for transparency checks but are no longer needed after simplification of the access control system.

Key changes:

  • Removes unused pOptionalTargetField parameters from CanAccess and related methods
  • Simplifies GrantsFriendAccessTo methods to only take the accessing assembly parameter
  • Updates all call sites to match the simplified method signatures

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/vm/clsload.hpp Removes pOptionalTargetField parameter from CanAccess method declarations
src/coreclr/vm/clsload.cpp Updates CanAccess implementation and removes unused parameters from helper methods
src/coreclr/vm/assembly.hpp Simplifies GrantsFriendAccessTo method signatures to remove member-specific overloads
src/coreclr/vm/assembly.cpp Consolidates multiple GrantsFriendAccessTo overloads into single method
src/coreclr/vm/runtimehandles.cpp Removes NULL parameter from CanAccess call
src/coreclr/vm/methodtablebuilder.cpp Updates GrantsFriendAccessTo calls to use simplified signature
src/coreclr/vm/jitinterface.cpp Removes unused parameters from multiple CanAccess calls
src/coreclr/vm/dllimport.cpp Updates CanAccess call to match new signature

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@davidwrighton
Copy link
Member Author

In the past these were used as part of much more elaborate transparency and such checks, but we don't do that anymore.

@jkotas jkotas merged commit 952e147 into dotnet:main Oct 15, 2025
95 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants