Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralesomas <a.somaschini@reply.it>2021-06-07 19:17:36 +0300
committerGitHub <noreply@github.com>2021-06-07 19:17:36 +0300
commit1843cdef72e1e7c810c4ea85c677d679ff3b66f4 (patch)
treeb07cbefe0a4bcfafe69ce8dc273568b73d63de87 /src/coreclr/vm
parent500e8723380c20f9c32c29e4fc269c40dc8b7759 (diff)
Added some logic to include rcwrefcache references required by feature_comwrappers (#53503)
* Set rcwrefcache related references only for feature_comwrappers Co-authored-by: Ubuntu <creditsuisse@BuildVM.hqykqmymov3ebcqudt35mscinc.ax.internal.cloudapp.net>
Diffstat (limited to 'src/coreclr/vm')
-rw-r--r--src/coreclr/vm/CMakeLists.txt6
-rw-r--r--src/coreclr/vm/appdomain.cpp14
-rw-r--r--src/coreclr/vm/appdomain.hpp15
3 files changed, 26 insertions, 9 deletions
diff --git a/src/coreclr/vm/CMakeLists.txt b/src/coreclr/vm/CMakeLists.txt
index d38633d6951..1d682d2a428 100644
--- a/src/coreclr/vm/CMakeLists.txt
+++ b/src/coreclr/vm/CMakeLists.txt
@@ -566,6 +566,10 @@ if(FEATURE_COMWRAPPERS OR FEATURE_OBJCMARSHAL)
if (FEATURE_COMWRAPPERS)
list(APPEND VM_SOURCES_WKS
interoplibinterface.cpp
+ rcwrefcache.cpp
+ )
+ list(APPEND VM_HEADERS_WKS
+ rcwrefcache.h
)
endif (FEATURE_COMWRAPPERS)
@@ -626,7 +630,6 @@ if(CLR_CMAKE_TARGET_WIN32)
mngstdinterfaces.cpp
notifyexternals.cpp
olecontexthelpers.cpp
- rcwrefcache.cpp
runtimecallablewrapper.cpp
stdinterfaces.cpp
stdinterfaces_wrapper.cpp
@@ -644,7 +647,6 @@ if(CLR_CMAKE_TARGET_WIN32)
mngstdinterfaces.h
notifyexternals.h
olecontexthelpers.h
- rcwrefcache.h
runtimecallablewrapper.h
stdinterfaces.h
stdinterfaces_internal.h
diff --git a/src/coreclr/vm/appdomain.cpp b/src/coreclr/vm/appdomain.cpp
index 8fa02c4f121..8192392cd08 100644
--- a/src/coreclr/vm/appdomain.cpp
+++ b/src/coreclr/vm/appdomain.cpp
@@ -47,10 +47,13 @@
#include "runtimecallablewrapper.h"
#include "mngstdinterfaces.h"
#include "olevariant.h"
-#include "rcwrefcache.h"
#include "olecontexthelpers.h"
#endif // FEATURE_COMINTEROP
+#if defined(FEATURE_COMWRAPPERS)
+#include "rcwrefcache.h"
+#endif // FEATURE_COMWRAPPERS
+
#include "typeequivalencehash.hpp"
#include "appdomain.inl"
@@ -2113,8 +2116,10 @@ AppDomain::AppDomain()
m_dwFlags = 0;
#ifdef FEATURE_COMINTEROP
m_pRCWCache = NULL;
+#endif //FEATURE_COMINTEROP
+#ifdef FEATURE_COMWRAPPERS
m_pRCWRefCache = NULL;
-#endif // FEATURE_COMINTEROP
+#endif // FEATURE_COMWRAPPERS
m_handleStore = NULL;
@@ -4418,7 +4423,7 @@ void AppDomain::NotifyDebuggerUnload()
#ifndef CROSSGEN_COMPILE
-#ifdef FEATURE_COMINTEROP
+#ifdef FEATURE_COMWRAPPERS
RCWRefCache *AppDomain::GetRCWRefCache()
{
@@ -4440,6 +4445,9 @@ RCWRefCache *AppDomain::GetRCWRefCache()
}
RETURN m_pRCWRefCache;
}
+#endif // FEATURE_COMWRAPPERS
+
+#ifdef FEATURE_COMINTEROP
RCWCache *AppDomain::CreateRCWCache()
{
diff --git a/src/coreclr/vm/appdomain.hpp b/src/coreclr/vm/appdomain.hpp
index 84101004f84..0487299c5f2 100644
--- a/src/coreclr/vm/appdomain.hpp
+++ b/src/coreclr/vm/appdomain.hpp
@@ -48,8 +48,10 @@ class TypeEquivalenceHashTable;
#ifdef FEATURE_COMINTEROP
class RCWCache;
+#endif //FEATURE_COMINTEROP
+#ifdef FEATURE_COMWRAPPERS
class RCWRefCache;
-#endif // FEATURE_COMINTEROP
+#endif // FEATURE_COMWRAPPERS
#ifdef _MSC_VER
#pragma warning(push)
@@ -1972,9 +1974,13 @@ public:
return m_pRCWCache;
}
- RCWRefCache *GetRCWRefCache();
#endif // FEATURE_COMINTEROP
+#ifdef FEATURE_COMWRAPPERS
+public:
+ RCWRefCache *GetRCWRefCache();
+#endif // FEATURE_COMWRAPPERS
+
TPIndex GetTPIndex()
{
LIMITED_METHOD_CONTRACT;
@@ -2240,10 +2246,11 @@ private:
#ifdef FEATURE_COMINTEROP
// this cache stores the RCWs in this domain
RCWCache *m_pRCWCache;
-
+#endif //FEATURE_COMINTEROP
+#ifdef FEATURE_COMWRAPPERS
// this cache stores the RCW -> CCW references in this domain
RCWRefCache *m_pRCWRefCache;
-#endif // FEATURE_COMINTEROP
+#endif // FEATURE_COMWRAPPERS
// The thread-pool index of this app domain among existing app domains (starting from 1)
TPIndex m_tpIndex;