Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions src/vm/threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -6735,30 +6735,29 @@ class FCallGCCanTrigger
Thread::TriggersGC(GetThread()); \
} while(0)

#else // ENABLE_CONTRACTS_IMPL

#define BEGINFORBIDGC()
#define ENDFORBIDGC()
#define TRIGGERSGC_NOSTOMP() ANNOTATION_GC_TRIGGERS
#define TRIGGERSGC() ANNOTATION_GC_TRIGGERS

#endif // ENABLE_CONTRACTS_IMPL

inline BOOL GC_ON_TRANSITIONS(BOOL val) {
WRAPPER_NO_CONTRACT;
#ifdef _DEBUG
Thread* thread = GetThread();
if (thread == 0)
return(FALSE);
BOOL ret = thread->m_GCOnTransitionsOK;
thread->m_GCOnTransitionsOK = val;
return(ret);
#else // _DEBUG
return FALSE;
#endif // !_DEBUG
}

#else // _DEBUG_IMPL

#define BEGINFORBIDGC()
#define ENDFORBIDGC()
#define TRIGGERSGC_NOSTOMP() ANNOTATION_GC_TRIGGERS
#define TRIGGERSGC() ANNOTATION_GC_TRIGGERS

inline BOOL GC_ON_TRANSITIONS(BOOL val) {
return FALSE;
}

#endif // _DEBUG_IMPL

#ifdef _DEBUG
inline void ENABLESTRESSHEAP() {
WRAPPER_NO_CONTRACT;
Expand Down