Skip to content

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

Merged
elinor-fung merged 6 commits intodotnet:mainfrom
elinor-fung:useCurrentDomain
Feb 8, 2024
Merged

Remove GetDomain functions on assorted method/type/assembly classes which are always in the single app domain#98135
elinor-fung merged 6 commits intodotnet:mainfrom
elinor-fung:useCurrentDomain

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