diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-11-22 14:22:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-22 14:22:40 -0800 |
commit | e54dffef08c22a94962aacd93d4793b377cac632 (patch) | |
tree | add9888e42a3c93be7ce63e6f2cbab48e80c4a2e /src/classlibnative | |
parent | f80f9d5435155cc7a36fbaefa3c8d7da7cc309aa (diff) | |
download | coreclr-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.cpp | 86 | ||||
-rw-r--r-- | src/classlibnative/bcltype/system.h | 3 |
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(); |