summaryrefslogtreecommitdiff
path: root/src/classlibnative
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-11-22 14:22:40 -0800
committerGitHub <noreply@github.com>2018-11-22 14:22:40 -0800
commite54dffef08c22a94962aacd93d4793b377cac632 (patch)
treeadd9888e42a3c93be7ce63e6f2cbab48e80c4a2e /src/classlibnative
parentf80f9d5435155cc7a36fbaefa3c8d7da7cc309aa (diff)
downloadcoreclr-e54dffef08c22a94962aacd93d4793b377cac632.tar.gz
coreclr-e54dffef08c22a94962aacd93d4793b377cac632.tar.bz2
coreclr-e54dffef08c22a94962aacd93d4793b377cac632.zip
Delete System.AppDomainSetup (#21157)
* Delete System.AppDomainSetup Contributes to #21028 * Add test hook for null entry assembly * Validate that the binder paths are absolute
Diffstat (limited to 'src/classlibnative')
-rw-r--r--src/classlibnative/bcltype/system.cpp86
-rw-r--r--src/classlibnative/bcltype/system.h3
2 files changed, 6 insertions, 83 deletions
diff --git a/src/classlibnative/bcltype/system.cpp b/src/classlibnative/bcltype/system.cpp
index 942ac3db0c..d525f87a29 100644
--- a/src/classlibnative/bcltype/system.cpp
+++ b/src/classlibnative/bcltype/system.cpp
@@ -158,17 +158,9 @@ void QCALLTYPE SystemNative::_GetCommandLine(QCall::StringHandleOnStack retStrin
LPCWSTR commandLine;
- if (g_pCachedCommandLine != NULL)
- {
- // Use the cached command line if available
- commandLine = g_pCachedCommandLine;
- }
- else
- {
- commandLine = WszGetCommandLine();
- if (commandLine==NULL)
- COMPlusThrowOM();
- }
+ commandLine = WszGetCommandLine();
+ if (commandLine==NULL)
+ COMPlusThrowOM();
retString.Set(commandLine);
@@ -185,17 +177,9 @@ FCIMPL0(Object*, SystemNative::GetCommandLineArgs)
LPWSTR commandLine;
- if (g_pCachedCommandLine != NULL)
- {
- // Use the cached command line if available
- commandLine = g_pCachedCommandLine;
- }
- else
- {
- commandLine = WszGetCommandLine();
- if (commandLine==NULL)
- COMPlusThrowOM();
- }
+ commandLine = WszGetCommandLine();
+ if (commandLine==NULL)
+ COMPlusThrowOM();
DWORD numArgs = 0;
LPWSTR* argv = SegmentCommandLine(commandLine, &numArgs);
@@ -250,64 +234,6 @@ FCIMPL1(ReflectMethodObject*, SystemNative::GetMethodFromStackTrace, ArrayBase*
}
FCIMPLEND
-FCIMPL0(StringObject*, SystemNative::_GetModuleFileName)
-{
- FCALL_CONTRACT;
-
- STRINGREF refRetVal = NULL;
-
- HELPER_METHOD_FRAME_BEGIN_RET_1(refRetVal);
- if (g_pCachedModuleFileName)
- {
- refRetVal = StringObject::NewString(g_pCachedModuleFileName);
- }
- else
- {
- PathString wszFilePathString;
-
-
- DWORD lgth = WszGetModuleFileName(NULL, wszFilePathString);
- if (!lgth)
- {
- COMPlusThrowWin32();
- }
-
-
- refRetVal = StringObject::NewString(wszFilePathString.GetUnicode());
- }
- HELPER_METHOD_FRAME_END();
-
- return (StringObject*)OBJECTREFToObject(refRetVal);
-}
-FCIMPLEND
-
-FCIMPL0(StringObject*, SystemNative::GetRuntimeDirectory)
-{
- FCALL_CONTRACT;
-
- STRINGREF refRetVal = NULL;
- DWORD dwFile = MAX_LONGPATH+1;
-
- HELPER_METHOD_FRAME_BEGIN_RET_1(refRetVal);
- SString wszFilePathString;
-
- WCHAR * wszFile = wszFilePathString.OpenUnicodeBuffer(dwFile);
- HRESULT hr = GetInternalSystemDirectory(wszFile, &dwFile);
- wszFilePathString.CloseBuffer(dwFile);
-
- if(FAILED(hr))
- COMPlusThrowHR(hr);
-
- dwFile--; // remove the trailing NULL
-
- if(dwFile)
- refRetVal = StringObject::NewString(wszFile, dwFile);
-
- HELPER_METHOD_FRAME_END();
- return (StringObject*)OBJECTREFToObject(refRetVal);
-}
-FCIMPLEND
-
INT32 QCALLTYPE SystemNative::GetProcessorCount()
{
QCALL_CONTRACT;
diff --git a/src/classlibnative/bcltype/system.h b/src/classlibnative/bcltype/system.h
index 9f985bf420..9480ee9417 100644
--- a/src/classlibnative/bcltype/system.h
+++ b/src/classlibnative/bcltype/system.h
@@ -56,9 +56,6 @@ public:
static FCDECL2(VOID, FailFastWithException, StringObject* refMessageUNSAFE, ExceptionObject* refExceptionUNSAFE);
static FCDECL3(VOID, FailFastWithExceptionAndSource, StringObject* refMessageUNSAFE, ExceptionObject* refExceptionUNSAFE, StringObject* errorSourceUNSAFE);
- static FCDECL0(StringObject*, _GetModuleFileName);
- static FCDECL0(StringObject*, GetRuntimeDirectory);
-
// Returns the number of logical processors that can be used by managed code
static INT32 QCALLTYPE GetProcessorCount();