Skip to content

Remove GetDomain functions on assorted method/type/assembly classes which are always in the single app domain #98135

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

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Feb 7, 2024

  • Remove GetDomain functions on MethodDesc, MethodTable, TypeDesc, and TypeHandle. They always return the single current app domain.
  • Remove GetDomain functions and variables on Assembly, DomainAssembly, and Module. The actual domain they are constructed with is always the single current app domain.

Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

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

There are several places where BaseDomain::IsAppDomain() is called. Ideally BaseDomain would be an abstract class so that is fine, but what about the SystemDomain. Did we confirm that SystemDomain is never cast to a BaseDomain and passed around?

@elinor-fung
Copy link
Member Author

Did we confirm that SystemDomain is never cast to a BaseDomain and passed around?

I checked this for the things I touched.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@elinor-fung elinor-fung merged commit c37e13f into dotnet:main Feb 8, 2024
@elinor-fung elinor-fung deleted the useCurrentDomain branch February 8, 2024 21:58
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants