From d8ea879a04cd6c66cffc5cfe78ee0703ab47deb2 Mon Sep 17 00:00:00 2001 From: Vitek Karas Date: Wed, 14 Aug 2019 22:21:01 -0700 Subject: [PATCH] Remove unused method (dotnet/coreclr#26168) Commit migrated from https://github.com/dotnet/coreclr/commit/bc1bf27bd1b58a34b169b77988b74e58273be2a4 --- src/coreclr/src/vm/appdomain.cpp | 47 ---------------------------------------- src/coreclr/src/vm/appdomain.hpp | 6 ----- 2 files changed, 53 deletions(-) diff --git a/src/coreclr/src/vm/appdomain.cpp b/src/coreclr/src/vm/appdomain.cpp index 407979f..635bba3 100644 --- a/src/coreclr/src/vm/appdomain.cpp +++ b/src/coreclr/src/vm/appdomain.cpp @@ -6501,53 +6501,6 @@ AppDomain::AssemblyIterator::Next_Unlocked( return FALSE; } // AppDomain::AssemblyIterator::Next_Unlocked -#ifndef DACCESS_COMPILE - -//--------------------------------------------------------------------------------------- -// -// Can be called only from AppDomain shutdown code:AppDomain::ShutdownAssemblies. -// Does not add-ref collectible assemblies (as the LoaderAllocator might not be reachable from the -// DomainAssembly anymore). -// -BOOL -AppDomain::AssemblyIterator::Next_UnsafeNoAddRef( - DomainAssembly ** ppDomainAssembly) -{ - CONTRACTL { - NOTHROW; - GC_TRIGGERS; - MODE_ANY; - } CONTRACTL_END; - - // Make sure we are iterating all assemblies (see the only caller code:AppDomain::ShutdownAssemblies) - _ASSERTE(m_assemblyIterationFlags == - (kIncludeLoaded | kIncludeLoading | kIncludeExecution | kIncludeFailedToLoad | kIncludeCollected)); - // It also means that we do not exclude anything - _ASSERTE((m_assemblyIterationFlags & kExcludeCollectible) == 0); - - // We are on shutdown path, so lock shouldn't be neccessary, but all _Unlocked methods on AssemblyList - // have asserts that the lock is held, so why not to take it ... - CrstHolder ch(m_pAppDomain->GetAssemblyListLock()); - - while (m_Iterator.Next()) - { - // Get element from the list/iterator (without adding reference to the assembly) - *ppDomainAssembly = dac_cast(m_Iterator.GetElement()); - if (*ppDomainAssembly == NULL) - { - continue; - } - - return TRUE; - } - - *ppDomainAssembly = NULL; - return FALSE; -} // AppDomain::AssemblyIterator::Next_UnsafeNoAddRef - - -#endif //!DACCESS_COMPILE - #if !defined(DACCESS_COMPILE) && !defined(CROSSGEN_COMPILE) // Returns S_OK if the assembly was successfully loaded diff --git a/src/coreclr/src/vm/appdomain.hpp b/src/coreclr/src/vm/appdomain.hpp index 2d14256..dd009ba 100644 --- a/src/coreclr/src/vm/appdomain.hpp +++ b/src/coreclr/src/vm/appdomain.hpp @@ -1898,12 +1898,6 @@ public: BOOL Next(CollectibleAssemblyHolder * pDomainAssemblyHolder); // Note: Does not lock the assembly list, but AddRefs collectible assemblies. BOOL Next_Unlocked(CollectibleAssemblyHolder * pDomainAssemblyHolder); -#ifndef DACCESS_COMPILE - private: - // Can be called only from AppDomain shutdown code:AppDomain::ShutdownAssemblies. - // Note: Does not lock the assembly list and does not AddRefs collectible assemblies. - BOOL Next_UnsafeNoAddRef(DomainAssembly ** ppDomainAssembly); -#endif private: inline DWORD GetIndex() -- 2.7.4