RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NativeImageRequire, W("NativeImageRequire"), 0, "", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NestedEhOom, W("NestedEhOom"), 0, "", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NO_SO_NOT_MAINLINE, W("NO_SO_NOT_MAINLINE"), 0, "", CLRConfig::REGUTIL_default)
-#if defined(CROSSGEN_COMPILE)
+#if defined(CROSSGEN_COMPILE) || defined(FEATURE_CORECLR)
#define INTERNAL_NoGuiOnAssert_Default 1
#else
#define INTERNAL_NoGuiOnAssert_Default 0
#endif
-CONFIG_DWORD_INFO_EX(INTERNAL_NoGuiOnAssert, W("NoGuiOnAssert"), INTERNAL_NoGuiOnAssert_Default, "", CLRConfig::REGUTIL_default)
+RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_NoGuiOnAssert, W("NoGuiOnAssert"), INTERNAL_NoGuiOnAssert_Default, "", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NoProcedureSplitting, W("NoProcedureSplitting"), 0, "", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NoStringInterning, W("NoStringInterning"), 1, "Disallows string interning. I see no value in it anymore.", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(EXTERNAL_NotifyBadAppCfg, W("NotifyBadAppCfg"), "Whether to show a message box for bad application config file.")
INDEBUG(BOOL DbgIsExecutable(LPVOID lpMem, SIZE_T length);)
+BOOL NoGuiOnAssert();
+#ifdef _DEBUG
+VOID TerminateOnAssert();
+#endif // _DEBUG
+
class HighCharHelper {
public:
static inline BOOL IsHighChar(int c) {
return fNoGui.val(CLRConfig::INTERNAL_ContinueOnAssert);
}
-BOOL NoGuiOnAssert()
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_DEBUG_ONLY;
-
- static ConfigDWORD fNoGui;
- return fNoGui.val(CLRConfig::INTERNAL_NoGuiOnAssert);
-}
-
void DoRaiseExceptionOnAssert(DWORD chance)
{
STATIC_CONTRACT_NOTHROW;
#endif // !defined(DACCESS_COMPILE)
#endif // _DEBUG
+BOOL NoGuiOnAssert()
+{
+ STATIC_CONTRACT_NOTHROW;
+ STATIC_CONTRACT_GC_NOTRIGGER;
+ STATIC_CONTRACT_DEBUG_ONLY;
+
+ static ConfigDWORD fNoGui;
+ return fNoGui.val(CLRConfig::INTERNAL_NoGuiOnAssert);
+}
+
// This helper will throw up a message box without allocating or using stack if possible, and is
// appropriate for either low memory or low stack situations.
int LowResourceMessageBoxHelperAnsi(
}
-extern BOOL NoGuiOnAssert();
extern "C"
//__declspec(dllexport)
BOOL STDMETHODCALLTYPE LogHelp_NoGuiOnAssert()
return fRet;
}
-extern VOID TerminateOnAssert();
extern "C"
//__declspec(dllexport)
VOID STDMETHODCALLTYPE LogHelp_TerminateOnAssert()
int result = IDRETRY;
+ if (NoGuiOnAssert())
+ {
+ return FailTerminate;
+ }
+
struct _gc {
STRINGREF strCondition;
STRINGREF strMessage;
}
msgText.Append(W("Description: "));
msgText.Append(message);
-
+
StackSString stackTraceText;
if (gc.strStackTrace != NULL) {
stackTraceText.Append(W("Stack Trace:\n"));
// Also, varargs and StackSString don't mix. Convert to string first.
const WCHAR* msgTextAsUnicode = msgText.GetUnicode();
result = EEMessageBoxNonLocalizedNonFatal(W("%s"), windowTitle, stackTraceText, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION, msgTextAsUnicode);
-
+
// map the user's choice to the values recognized by
// the System.Diagnostics.Assert package
if (result == IDRETRY)