OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Platform-specific code for Win32. | 5 // Platform-specific code for Win32. |
6 | 6 |
7 // Secure API functions are not available using MinGW with msvcrt.dll | 7 // Secure API functions are not available using MinGW with msvcrt.dll |
8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to | 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to |
9 // disable definition of secure API functions in standard headers that | 9 // disable definition of secure API functions in standard headers that |
10 // would conflict with our own implementation. | 10 // would conflict with our own implementation. |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 ::Sleep(static_cast<DWORD>(interval.InMilliseconds())); | 826 ::Sleep(static_cast<DWORD>(interval.InMilliseconds())); |
827 } | 827 } |
828 | 828 |
829 | 829 |
830 void OS::Abort() { | 830 void OS::Abort() { |
831 if (g_hard_abort) { | 831 if (g_hard_abort) { |
832 V8_IMMEDIATE_CRASH(); | 832 V8_IMMEDIATE_CRASH(); |
833 } | 833 } |
834 // Make the MSVCRT do a silent abort. | 834 // Make the MSVCRT do a silent abort. |
835 raise(SIGABRT); | 835 raise(SIGABRT); |
| 836 |
| 837 // Make sure function doesn't return. |
| 838 abort(); |
836 } | 839 } |
837 | 840 |
838 | 841 |
839 void OS::DebugBreak() { | 842 void OS::DebugBreak() { |
840 #if V8_CC_MSVC | 843 #if V8_CC_MSVC |
841 // To avoid Visual Studio runtime support the following code can be used | 844 // To avoid Visual Studio runtime support the following code can be used |
842 // instead | 845 // instead |
843 // __asm { int 3 } | 846 // __asm { int 3 } |
844 __debugbreak(); | 847 __debugbreak(); |
845 #else | 848 #else |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 | 1392 |
1390 | 1393 |
1391 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 1394 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
1392 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); | 1395 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); |
1393 USE(result); | 1396 USE(result); |
1394 DCHECK(result); | 1397 DCHECK(result); |
1395 } | 1398 } |
1396 | 1399 |
1397 } // namespace base | 1400 } // namespace base |
1398 } // namespace v8 | 1401 } // namespace v8 |
OLD | NEW |