summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAditya Mandaleeka <adityam@microsoft.com>2015-10-19 18:21:36 -0700
committerAditya Mandaleeka <adityam@microsoft.com>2015-10-19 18:25:19 -0700
commit0786c55bf36321a49bb09b5d37a1b2d5f79fd9e9 (patch)
treea144580e79ec67ddcdcc3eb343351fd85d736b79 /src
parent3015ff7afb4936a1c5c5856daa4e3482e6b390a9 (diff)
downloadcoreclr-0786c55bf36321a49bb09b5d37a1b2d5f79fd9e9.tar.gz
coreclr-0786c55bf36321a49bb09b5d37a1b2d5f79fd9e9.tar.bz2
coreclr-0786c55bf36321a49bb09b5d37a1b2d5f79fd9e9.zip
Revert some changed files from an incorrectly merged commit.
Commit 4cf34fe seems to have included some unintentional changes which are affecting the product. This reverts those files to what they should be.
Diffstat (limited to 'src')
-rw-r--r--src/inc/clr/fs/path.h19
-rw-r--r--src/pal/src/CMakeLists.txt1
-rw-r--r--src/pal/src/misc/stackstring.cpp138
-rw-r--r--src/vm/corhost.cpp2
-rw-r--r--src/vm/exceptmacros.h2
5 files changed, 4 insertions, 158 deletions
diff --git a/src/inc/clr/fs/path.h b/src/inc/clr/fs/path.h
index 8d72d54fb1..a1b47dd295 100644
--- a/src/inc/clr/fs/path.h
+++ b/src/inc/clr/fs/path.h
@@ -36,25 +36,6 @@ namespace clr
class Path
{
public:
-#if !PLATFORM_UNIX
- static const CHAR DirectorySeparatorChar = '\\';
-#else // PLATFORM_UNIX
- static const CHAR DirectorySeparatorChar = '/';
-#endif
-
-#if !PLATFORM_UNIX
- static const CHAR PathSeparatorChar = ';';
-#else // PLATFORM_UNIX
- static const CHAR PathSeparatorChar = ':';
-#endif // !PLATFORM_UNIX
-
-#if !PLATFORM_UNIX
- static const CHAR VolumeSeparatorChar = ':';
-#else // PLATFORM_UNIX
- static const CHAR VolumeSeparatorChar = '/';
-#endif // !PLATFORM_UNIX
-
- public:
//-----------------------------------------------------------------------------------------
static inline bool
Exists(
diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt
index 8b6fc67f24..f1a254687d 100644
--- a/src/pal/src/CMakeLists.txt
+++ b/src/pal/src/CMakeLists.txt
@@ -138,7 +138,6 @@ set(SOURCES
misc/interlock.cpp
misc/miscpalapi.cpp
misc/msgbox.cpp
- misc/stackstring.cpp
misc/strutil.cpp
misc/sysinfo.cpp
misc/time.cpp
diff --git a/src/pal/src/misc/stackstring.cpp b/src/pal/src/misc/stackstring.cpp
deleted file mode 100644
index d35c0d88fc..0000000000
--- a/src/pal/src/misc/stackstring.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-#include "pal/malloc.hpp"
-#include "pal/dbgmsg.h"
-
-SET_DEFAULT_DEBUG_CHANNEL(MISC);
-
-template <SIZE_T STACKCOUNT>
-class StackString
-{
-private:
- WCHAR m_innerBuffer[STACKCOUNT + 1];
- WCHAR * m_buffer;
- SIZE_T m_count; // actual allocated count
-
- void NullTerminate()
- {
- m_buffer[m_count] = W('\0');
- }
-
- void DeleteBuffer()
- {
- if (m_innerBuffer != m_buffer)
- PAL_free(m_buffer);
-
- m_buffer = NULL;
- return;
- }
-
- void ReallocateBuffer(SIZE_T count)
- {
- // count is always > STACKCOUNT here.
- WCHAR * newBuffer = (WCHAR *)PAL_malloc((count + 1) * sizeof(WCHAR));
- if (NULL == newBuffer)
- {
- ERROR("malloc failed\n");
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
-
- DeleteBuffer();
- m_count = 0;
-
- return;
- }
-
- DeleteBuffer();
- m_buffer = newBuffer;
- m_count = count;
-
- return;
- }
-
- void Resize(SIZE_T count)
- {
- if (NULL == m_buffer)
- {
- if (count > STACKCOUNT)
- {
- ReallocateBuffer(count);
- }
- else
- {
- m_buffer = m_innerBuffer;
- m_count = count;
- }
- }
- else if (m_innerBuffer == m_buffer)
- {
- if (count > STACKCOUNT)
- ReallocateBuffer(count);
- else
- m_count = count;
- }
- else
- {
- ReallocateBuffer(count);
- }
-
- return;
- }
-
- StackString(const StackString &s)
- {
- Set(s);
- }
-
- ~StackString()
- {
- DeleteBuffer();
- }
-
-public:
- StackString()
- : m_count(0), m_buffer(m_innerBuffer)
- {
- }
-
- BOOL Set(const WCHAR * buffer, SIZE_T count)
- {
- Resize(count);
- if (NULL == m_buffer)
- return FALSE;
-
- CopyMemory(m_buffer, buffer, (count + 1) * sizeof(WCHAR));
- NullTerminate();
- return TRUE;
- }
-
- BOOL Set(const StackString &s)
- {
- return Set(s.m_buffer, s.m_count);
- }
-
- SIZE_T Getcount() const
- {
- return m_count;
- }
-
- CONST WCHAR * GetString() const
- {
- return (const WCHAR *)m_buffer;
- }
-
- WCHAR * OpenStringBuffer(SIZE_T count)
- {
- Resize(count);
- return (WCHAR *)m_buffer;
- }
-
- void CloseBuffer(SIZE_T count)
- {
- if (m_count > count)
- m_count = count;
-
- NullTerminate();
- return;
- }
-};
diff --git a/src/vm/corhost.cpp b/src/vm/corhost.cpp
index 451043fc45..161b2a1fae 100644
--- a/src/vm/corhost.cpp
+++ b/src/vm/corhost.cpp
@@ -1270,6 +1270,7 @@ HRESULT CorHost2::ExecuteAssembly(DWORD dwAppDomainId,
return HOST_E_INVALIDOPERATION;
}
+ INSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP;
INSTALL_UNWIND_AND_CONTINUE_HANDLER;
_ASSERTE (!pThread->PreemptiveGCDisabled());
@@ -1302,6 +1303,7 @@ HRESULT CorHost2::ExecuteAssembly(DWORD dwAppDomainId,
}
UNINSTALL_UNWIND_AND_CONTINUE_HANDLER;
+ UNINSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP;
ErrExit:
diff --git a/src/vm/exceptmacros.h b/src/vm/exceptmacros.h
index 82b2cf2878..0c66913aef 100644
--- a/src/vm/exceptmacros.h
+++ b/src/vm/exceptmacros.h
@@ -363,6 +363,8 @@ VOID DECLSPEC_NORETURN DispatchManagedException(PAL_SEHException& ex);
#define INSTALL_MANAGED_EXCEPTION_DISPATCHER
#define UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
+#define INSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP
+#define UNINSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP
#endif // FEATURE_PAL