OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 | 865 |
866 | 866 |
867 void OS::Sleep(int milliseconds) { | 867 void OS::Sleep(int milliseconds) { |
868 ::Sleep(milliseconds); | 868 ::Sleep(milliseconds); |
869 } | 869 } |
870 | 870 |
871 | 871 |
872 void OS::Abort() { | 872 void OS::Abort() { |
873 if (IsDebuggerPresent() || FLAG_break_on_abort) { | 873 if (IsDebuggerPresent() || FLAG_break_on_abort) { |
874 DebugBreak(); | 874 DebugBreak(); |
| 875 } else { |
| 876 // Make the MSVCRT do a silent abort. |
| 877 raise(SIGABRT); |
875 } | 878 } |
876 V8_IMMEDIATE_CRASH(); | |
877 } | 879 } |
878 | 880 |
879 | 881 |
880 void OS::DebugBreak() { | 882 void OS::DebugBreak() { |
881 #ifdef _MSC_VER | 883 #ifdef _MSC_VER |
882 // To avoid Visual Studio runtime support the following code can be used | 884 // To avoid Visual Studio runtime support the following code can be used |
883 // instead | 885 // instead |
884 // __asm { int 3 } | 886 // __asm { int 3 } |
885 __debugbreak(); | 887 __debugbreak(); |
886 #else | 888 #else |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 ASSERT(result); | 1445 ASSERT(result); |
1444 } | 1446 } |
1445 | 1447 |
1446 | 1448 |
1447 | 1449 |
1448 void Thread::YieldCPU() { | 1450 void Thread::YieldCPU() { |
1449 Sleep(0); | 1451 Sleep(0); |
1450 } | 1452 } |
1451 | 1453 |
1452 } } // namespace v8::internal | 1454 } } // namespace v8::internal |
OLD | NEW |