summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-12 10:43:35 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-12 16:55:37 -0800
commit2215a4e81c0d4f10edf9ff440c51b240586865e1 (patch)
treeedc8b28374ef8524b7453649aa3e710926a086f5 /src/vm
parentba2dc9d177a63701e176c793df7fd9c21fe85548 (diff)
downloadcoreclr-2215a4e81c0d4f10edf9ff440c51b240586865e1.tar.gz
coreclr-2215a4e81c0d4f10edf9ff440c51b240586865e1.tar.bz2
coreclr-2215a4e81c0d4f10edf9ff440c51b240586865e1.zip
Remove always defined FEATURE_EXCEPTION_NOTIFICATIONS
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/comdelegate.cpp10
-rw-r--r--src/vm/excep.cpp5
-rw-r--r--src/vm/excep.h4
-rw-r--r--src/vm/exceptionhandling.cpp4
-rw-r--r--src/vm/exceptionhandling.h6
-rw-r--r--src/vm/exinfo.cpp2
-rw-r--r--src/vm/exinfo.h2
-rw-r--r--src/vm/i386/excepx86.cpp4
-rw-r--r--src/vm/mscorlib.h4
-rw-r--r--src/vm/namespace.h2
-rw-r--r--src/vm/object.h4
11 files changed, 2 insertions, 45 deletions
diff --git a/src/vm/comdelegate.cpp b/src/vm/comdelegate.cpp
index f0799add07..2bb792aeab 100644
--- a/src/vm/comdelegate.cpp
+++ b/src/vm/comdelegate.cpp
@@ -3964,13 +3964,7 @@ static void InvokeUnhandledSwallowing(OBJECTREF *pDelegate,
EX_TRY
{
- // We have used both the FEATURE_ defines here since without CSE feature,
- // this aspect of notification feature is pointless. And skipping
- // FEATURE_EXCEPTION_NOTIFICATIONS with only FEATURE_CORRUPTING_EXCEPTIONS
- // specified would enable this change for builds that dont support
- // FEATURE_EXCEPTION_NOTIFICATIONS, like CoreCLR. We dont want that to happen
- // as well.
-#if defined(FEATURE_CORRUPTING_EXCEPTIONS) && defined(FEATURE_EXCEPTION_NOTIFICATIONS)
+#if defined(FEATURE_CORRUPTING_EXCEPTIONS)
BOOL fCanMethodHandleException = g_pConfig->LegacyCorruptedStateExceptionsPolicy();
if (!fCanMethodHandleException)
{
@@ -4002,7 +3996,7 @@ static void InvokeUnhandledSwallowing(OBJECTREF *pDelegate,
}
if (fCanMethodHandleException)
-#endif // defined(FEATURE_CORRUPTING_EXCEPTIONS) && defined(FEATURE_EXCEPTION_NOTIFICATIONS)
+#endif // defined(FEATURE_CORRUPTING_EXCEPTIONS)
{
// We've already exercised the prestub on this delegate's COMDelegate::GetMethodDesc,
// as part of wiring up a reliable event sink. Deliver the notification.
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp
index 277a9d9820..e4c5ddfe66 100644
--- a/src/vm/excep.cpp
+++ b/src/vm/excep.cpp
@@ -12515,9 +12515,6 @@ void ReturnToPreviousAppDomainHolder::SuppressRelease()
#ifndef DACCESS_COMPILE
// This method will deliver the actual exception notification. Its assumed that the caller has done the necessary checks, including
// checking whether the delegate can be invoked for the exception's corruption severity.
-//
-// This has been factored out of the #IFDEF FEATURE_EXCEPTION_NOTIFICATIONS so that existing ADUEN mechanism can be integrated with
-// the enhanced exception notifications.
void ExceptionNotifications::DeliverExceptionNotification(ExceptionNotificationHandlerType notificationType, OBJECTREF *pDelegate,
OBJECTREF *pAppDomain, OBJECTREF *pEventArgs)
{
@@ -12543,7 +12540,6 @@ void ExceptionNotifications::DeliverExceptionNotification(ExceptionNotificationH
CALL_MANAGED_METHOD_NORET(args);
}
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// To include definition of COMDelegate::GetMethodDesc
#include "comdelegate.h"
@@ -12954,7 +12950,6 @@ void ExceptionNotifications::DeliverFirstChanceNotification()
}
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
#ifdef WIN64EXCEPTIONS
struct TAResetStateCallbackData
diff --git a/src/vm/excep.h b/src/vm/excep.h
index 6057c551a5..7e7df4fbcb 100644
--- a/src/vm/excep.h
+++ b/src/vm/excep.h
@@ -888,10 +888,8 @@ LONG EntryPointFilter(PEXCEPTION_POINTERS pExceptionInfo, PVOID _pData);
enum ExceptionNotificationHandlerType
{
UnhandledExceptionHandler = 0x1
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
,
FirstChanceExceptionHandler = 0x2
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
};
// Defined in Frames.h
@@ -900,7 +898,6 @@ enum ExceptionNotificationHandlerType
// This class contains methods to support delivering the various exception notifications.
class ExceptionNotifications
{
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
private:
void static GetEventArgsForNotification(ExceptionNotificationHandlerType notificationType,
OBJECTREF *pOutEventArgs, OBJECTREF *pThrowable);
@@ -932,7 +929,6 @@ public:
#ifdef FEATURE_CORRUPTING_EXCEPTIONS
BOOL static CanDelegateBeInvokedForException(OBJECTREF *pDelegate, CorruptionSeverity severity);
#endif // FEATURE_CORRUPTING_EXCEPTIONS
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
public:
void static DeliverExceptionNotification(ExceptionNotificationHandlerType notificationType, OBJECTREF *pDelegate,
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp
index 63192a2146..ba7a68dba7 100644
--- a/src/vm/exceptionhandling.cpp
+++ b/src/vm/exceptionhandling.cpp
@@ -2211,13 +2211,11 @@ CLRUnwindStatus ExceptionTracker::ProcessExplicitFrame(
#if defined(DEBUGGING_SUPPORTED)
if (ExceptionTracker::NotifyDebuggerOfStub(pThread, sf, pFrame))
{
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// Deliver the FirstChanceNotification after the debugger, if not already delivered.
if (!this->DeliveredFirstChanceNotification())
{
ExceptionNotifications::DeliverFirstChanceNotification();
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
}
#endif // DEBUGGING_SUPPORTED
@@ -2551,14 +2549,12 @@ CLRUnwindStatus ExceptionTracker::ProcessManagedCallFrame(
}
#endif // DEBUGGING_SUPPORTED
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// Attempt to deliver the first chance notification to the AD only *AFTER* the debugger
// has done that, provided we have not already delivered it.
if (!this->DeliveredFirstChanceNotification())
{
ExceptionNotifications::DeliverFirstChanceNotification();
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
}
else
{
diff --git a/src/vm/exceptionhandling.h b/src/vm/exceptionhandling.h
index e324d280df..c6fe35ae09 100644
--- a/src/vm/exceptionhandling.h
+++ b/src/vm/exceptionhandling.h
@@ -85,11 +85,9 @@ public:
m_CorruptionSeverity = NotSet;
#endif // FEATURE_CORRUPTING_EXCEPTIONS
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// By default, mark the tracker as not having delivered the first
// chance exception notification
m_fDeliveredFirstChanceNotification = FALSE;
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
m_sfFirstPassTopmostFrame.Clear();
@@ -147,11 +145,9 @@ public:
m_CorruptionSeverity = NotSet;
#endif // FEATURE_CORRUPTING_EXCEPTIONS
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// By default, mark the tracker as not having delivered the first
// chance exception notification
m_fDeliveredFirstChanceNotification = FALSE;
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
m_dwIndexClauseForCatch = 0;
m_sfEstablisherOfActualHandlerFrame.Clear();
@@ -616,7 +612,6 @@ public:
}
#endif // FEATURE_CORRUPTING_EXCEPTIONS
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
private:
BOOL m_fDeliveredFirstChanceNotification;
@@ -634,7 +629,6 @@ public:
m_fDeliveredFirstChanceNotification = fDelivered;
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
// Returns the exception tracker previous to the current
inline PTR_ExceptionTracker GetPreviousExceptionTracker()
diff --git a/src/vm/exinfo.cpp b/src/vm/exinfo.cpp
index 1ae011e85a..1a73e25a6e 100644
--- a/src/vm/exinfo.cpp
+++ b/src/vm/exinfo.cpp
@@ -118,11 +118,9 @@ void ExInfo::Init()
m_CorruptionSeverity = NotSet;
#endif // FEATURE_CORRUPTING_EXCEPTIONS
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// By default, mark the tracker as not having delivered the first
// chance exception notification
m_fDeliveredFirstChanceNotification = FALSE;
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
m_pTopMostHandlerDuringSO = NULL;
diff --git a/src/vm/exinfo.h b/src/vm/exinfo.h
index 2a8030fb56..6b34e71116 100644
--- a/src/vm/exinfo.h
+++ b/src/vm/exinfo.h
@@ -109,7 +109,6 @@ public:
}
#endif // FEATURE_CORRUPTING_EXCEPTIONS
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
private:
BOOL m_fDeliveredFirstChanceNotification;
public:
@@ -126,7 +125,6 @@ public:
m_fDeliveredFirstChanceNotification = fDelivered;
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
// Returns the exception tracker previous to the current
inline PTR_ExInfo GetPreviousExceptionTracker()
diff --git a/src/vm/i386/excepx86.cpp b/src/vm/i386/excepx86.cpp
index 7c93963aad..10f68a9fbf 100644
--- a/src/vm/i386/excepx86.cpp
+++ b/src/vm/i386/excepx86.cpp
@@ -2431,13 +2431,11 @@ StackWalkAction COMPlusThrowCallback( // SWA value
currentSP = (SIZE_T) ((void*) pFrameStub);
currentIP = 0; // no IP.
EEToDebuggerExceptionInterfaceWrapper::FirstChanceManagedException(pThread, (SIZE_T)currentIP, (SIZE_T)currentSP);
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// Deliver the FirstChanceNotification after the debugger, if not already delivered.
if (!pExInfo->DeliveredFirstChanceNotification())
{
ExceptionNotifications::DeliverFirstChanceNotification();
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
}
}
}
@@ -2486,14 +2484,12 @@ StackWalkAction COMPlusThrowCallback( // SWA value
}
#endif // DEBUGGING_SUPPORTED
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// Attempt to deliver the first chance notification to the AD only *AFTER* the debugger
// has done that, provided we have not already done that.
if (!pExInfo->DeliveredFirstChanceNotification())
{
ExceptionNotifications::DeliverFirstChanceNotification();
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
}
IJitManager* pJitManager = pCf->GetJitManager();
_ASSERTE(pJitManager);
diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h
index 8f20078068..cf0d8e1100 100644
--- a/src/vm/mscorlib.h
+++ b/src/vm/mscorlib.h
@@ -93,9 +93,7 @@ DEFINE_FIELD_U(_unhandledException, AppDomainBaseObject, m_pUnhandledExce
DEFINE_FIELD_U(_aptcaVisibleAssemblies, AppDomainBaseObject, m_aptcaVisibleAssemblies)
#endif
DEFINE_FIELD_U(_compatFlags, AppDomainBaseObject, m_compatFlags)
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
DEFINE_FIELD_U(_firstChanceException, AppDomainBaseObject, m_pFirstChanceExceptionHandler)
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
DEFINE_FIELD_U(_pDomain, AppDomainBaseObject, m_pDomain)
DEFINE_FIELD_U(_HasSetPolicy, AppDomainBaseObject, m_bHasSetPolicy)
DEFINE_FIELD_U(_IsFastFullTrustDomain, AppDomainBaseObject, m_bIsFastFullTrustDomain)
@@ -1417,10 +1415,8 @@ DEFINE_CLASS(TYPE_DELEGATOR, Reflection, TypeDelegator)
DEFINE_CLASS(UNHANDLED_EVENTARGS, System, UnhandledExceptionEventArgs)
DEFINE_METHOD(UNHANDLED_EVENTARGS, CTOR, .ctor, IM_Obj_Bool_RetVoid)
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
DEFINE_CLASS(FIRSTCHANCE_EVENTARGS, ExceptionServices, FirstChanceExceptionEventArgs)
DEFINE_METHOD(FIRSTCHANCE_EVENTARGS, CTOR, .ctor, IM_Exception_RetVoid)
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
#if defined(FEATURE_HOST_ASSEMBLY_RESOLVER)
diff --git a/src/vm/namespace.h b/src/vm/namespace.h
index e679fb5fe4..eb69aa907e 100644
--- a/src/vm/namespace.h
+++ b/src/vm/namespace.h
@@ -74,9 +74,7 @@
#define g_WindowsFoundationDiagNS "Windows.Foundation.Diagnostics"
-#if defined(FEATURE_CORRUPTING_EXCEPTIONS) || defined(FEATURE_EXCEPTION_NOTIFICATIONS)
#define g_ExceptionServicesNS g_RuntimeNS ".ExceptionServices"
-#endif // defined(FEATURE_CORRUPTING_EXCEPTION) || defined(FEATURE_EXCEPTION_NOTIFICATIONS)
#if defined(FEATURE_HOST_ASSEMBLY_RESOLVER)
#define g_LoaderNS g_RuntimeNS ".Loader"
diff --git a/src/vm/object.h b/src/vm/object.h
index c26011a733..8a987db0b1 100644
--- a/src/vm/object.h
+++ b/src/vm/object.h
@@ -2298,9 +2298,7 @@ class AppDomainBaseObject : public MarshalByRefObjectBaseObject
OBJECTREF m_compatFlags;
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
OBJECTREF m_pFirstChanceExceptionHandler; // Delegate for 'FirstChance Exception' event
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
AppDomain* m_pDomain; // Pointer to the BaseDomain Structure
CLR_BOOL m_bHasSetPolicy; // SetDomainPolicy has been called for this domain
@@ -2376,7 +2374,6 @@ class AppDomainBaseObject : public MarshalByRefObjectBaseObject
}
#endif // FEATURE_CLICKONCE
-#ifdef FEATURE_EXCEPTION_NOTIFICATIONS
// Returns the reference to the delegate of the first chance exception notification handler
OBJECTREF GetFirstChanceExceptionNotificationHandler()
{
@@ -2384,7 +2381,6 @@ class AppDomainBaseObject : public MarshalByRefObjectBaseObject
return m_pFirstChanceExceptionHandler;
}
-#endif // FEATURE_EXCEPTION_NOTIFICATIONS
};