1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4//
5
6//
7// ---------------------------------------------------------------------------
8// CLREx.h
9// ---------------------------------------------------------------------------
10
11
12#ifndef _CLREX_INL_
13#define _CLREX_INL_
14
15inline CLRException::HandlerState::HandlerState(Thread * pThread)
16{
17 STATIC_CONTRACT_NOTHROW;
18 STATIC_CONTRACT_GC_NOTRIGGER;
19 STATIC_CONTRACT_MODE_ANY;
20 STATIC_CONTRACT_CANNOT_TAKE_LOCK;
21 STATIC_CONTRACT_SO_TOLERANT;
22
23 m_pThread = pThread;
24 if (m_pThread == NULL)
25 {
26 m_pFrame = NULL;
27 m_fPreemptiveGCDisabled = FALSE;
28 }
29 else
30 {
31 m_pFrame = m_pThread->GetFrame();
32 m_fPreemptiveGCDisabled = m_pThread->PreemptiveGCDisabled();
33 }
34}
35
36inline CLRException::HandlerState::HandlerState(Thread * pThread, CLRException::HandlerState::NonNullThread dummy)
37{
38 STATIC_CONTRACT_NOTHROW;
39 STATIC_CONTRACT_GC_NOTRIGGER;
40 STATIC_CONTRACT_MODE_ANY;
41 STATIC_CONTRACT_CANNOT_TAKE_LOCK;
42 STATIC_CONTRACT_SO_TOLERANT;
43 _ASSERTE(pThread != NULL);
44
45 m_pThread = pThread;
46 m_pFrame = m_pThread->GetFrame();
47 m_fPreemptiveGCDisabled = m_pThread->PreemptiveGCDisabled();
48}
49
50
51#endif // _CLREX_INL_
52