static bool AppDomainCanAccessHandleTable(uint32_t appDomainID);
static uint32_t GetIndexOfAppDomainBeingUnloaded();
static uint32_t GetTotalNumSizedRefHandles();
- static bool GCToEEInterface::AppDomainIsRudeUnload(void *appDomain);
+ static bool AppDomainIsRudeUnload(void *appDomain);
};
#endif // __GCENV_EE_H__
#include "gchandletableimpl.h"
-#ifndef BUILD_AS_STANDALONE
-#ifdef FEATURE_COMINTEROP
-#include "comcallablewrapper.h"
-#endif // FEATURE_COMINTEROP
-#endif // BUILD_AS_STANDALONE
-
HandleTableMap g_HandleTableMap;
// Array of contexts used while scanning dependent handles for promotion. There are as many contexts as GC
#endif
break;
-#if defined(FEATURE_COMINTEROP) && !defined(FEATURE_REDHAWK) && !defined(BUILD_AS_STANDALONE)
+#if defined(FEATURE_COMINTEROP) && !defined(FEATURE_REDHAWK)
case HNDTYPE_REFCOUNTED:
rootFlags |= kEtwGCRootFlagsRefCounted;
if (*pRef != NULL)
{
- ComCallWrapper* pWrap = ComCallWrapper::GetWrapperForObject((OBJECTREF)*pRef);
- if (pWrap == NULL || !pWrap->IsWrapperActive())
+ if (!GCToEEInterface::RefCountedHandleCallbacks(*pRef))
rootFlags |= kEtwGCRootFlagsWeakRef;
}
break;
#ifdef FEATURE_COMINTEROP
//<REVISIT_TODO>@todo optimize the access to the ref-count
ComCallWrapper* pWrap = ComCallWrapper::GetWrapperForObject((OBJECTREF)pObject);
- _ASSERTE(pWrap != NULL);
- return !!pWrap->IsWrapperActive();
+ return pWrap != NULL && pWrap->IsWrapperActive();
#else
return false;
#endif
AppDomain *realPtr = static_cast<AppDomain *>(appDomain);
return realPtr->IsRudeUnload() != FALSE;
}
-