| 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); | |
| 878 } | 875 } |
| 876 V8_IMMEDIATE_CRASH(); |
| 879 } | 877 } |
| 880 | 878 |
| 881 | 879 |
| 882 void OS::DebugBreak() { | 880 void OS::DebugBreak() { |
| 883 #ifdef _MSC_VER | 881 #ifdef _MSC_VER |
| 884 // To avoid Visual Studio runtime support the following code can be used | 882 // To avoid Visual Studio runtime support the following code can be used |
| 885 // instead | 883 // instead |
| 886 // __asm { int 3 } | 884 // __asm { int 3 } |
| 887 __debugbreak(); | 885 __debugbreak(); |
| 888 #else | 886 #else |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 ASSERT(result); | 1443 ASSERT(result); |
| 1446 } | 1444 } |
| 1447 | 1445 |
| 1448 | 1446 |
| 1449 | 1447 |
| 1450 void Thread::YieldCPU() { | 1448 void Thread::YieldCPU() { |
| 1451 Sleep(0); | 1449 Sleep(0); |
| 1452 } | 1450 } |
| 1453 | 1451 |
| 1454 } } // namespace v8::internal | 1452 } } // namespace v8::internal |
| OLD | NEW |