summaryrefslogtreecommitdiff
path: root/src/vm/corhost.cpp
diff options
context:
space:
mode:
authorAnirudh Agnihotry <anirudhagnihotry098@gmail.com>2017-12-28 16:35:12 -0800
committerJan Kotas <jkotas@microsoft.com>2017-12-28 16:35:12 -0800
commit31e22b200de37bd8005c650c90e2098e42201eec (patch)
tree8258b6a16d353d1bafa176cab4f8b95e0010dc57 /src/vm/corhost.cpp
parent09ab9723fd6a05a57685137ccb795680d975693d (diff)
downloadcoreclr-31e22b200de37bd8005c650c90e2098e42201eec.tar.gz
coreclr-31e22b200de37bd8005c650c90e2098e42201eec.tar.bz2
coreclr-31e22b200de37bd8005c650c90e2098e42201eec.zip
Recognize STA\MTA Attribute For Main Function (#15652)
* Apartment state set for main method * g_fWeownprocess removed and CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_FinalizeOnShutdown) set
Diffstat (limited to 'src/vm/corhost.cpp')
-rw-r--r--src/vm/corhost.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp
index 7c9831788c..8ba96007cb 100644
--- a/src/vm/corhost.cpp
+++ b/src/vm/corhost.cpp
@@ -108,8 +108,6 @@ typedef DPTR(CONNID) PTR_CONNID;
// *** ICorRuntimeHost methods ***
-extern BOOL g_fWeOwnProcess;
-
CorHost2::CorHost2()
{
LIMITED_METHOD_CONTRACT;
@@ -195,18 +193,7 @@ STDMETHODIMP CorHost2::Start()
// So, if you want to do that, just make sure you are the first host to load the
// specific version of CLR in memory AND start it.
m_fFirstToLoadCLR = TRUE;
- if (FastInterlockIncrement(&m_RefCount) != 1)
- {
- }
- else
- {
- if (g_fWeOwnProcess)
- {
- // Runtime is started by a managed exe. Bump the ref-count, so that
- // matching Start/Stop does not stop runtime.
- FastInterlockIncrement(&m_RefCount);
- }
- }
+ FastInterlockIncrement(&m_RefCount);
}
}