Simplify silent abort by raising SIGABRT directly.
Review URL: https://chromiumcodereview.appspot.com/9597012 Patch from Jonathan Liu <net147@gmail.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
5ce562cda8
commit
71c5924e63
@ -967,12 +967,8 @@ void OS::Sleep(int milliseconds) {
|
|||||||
|
|
||||||
void OS::Abort() {
|
void OS::Abort() {
|
||||||
if (!IsDebuggerPresent()) {
|
if (!IsDebuggerPresent()) {
|
||||||
#ifdef _MSC_VER
|
|
||||||
// Make the MSVCRT do a silent abort.
|
// Make the MSVCRT do a silent abort.
|
||||||
_set_abort_behavior(0, _WRITE_ABORT_MSG);
|
raise(SIGABRT);
|
||||||
_set_abort_behavior(0, _CALL_REPORTFAULT);
|
|
||||||
#endif // _MSC_VER
|
|
||||||
abort();
|
|
||||||
} else {
|
} else {
|
||||||
DebugBreak();
|
DebugBreak();
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#ifdef V8_WIN32_HEADERS_FULL
|
#ifdef V8_WIN32_HEADERS_FULL
|
||||||
|
#include <signal.h> // For raise().
|
||||||
#include <time.h> // For LocalOffset() implementation.
|
#include <time.h> // For LocalOffset() implementation.
|
||||||
#include <mmsystem.h> // For timeGetTime().
|
#include <mmsystem.h> // For timeGetTime().
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
@ -78,7 +79,7 @@
|
|||||||
#ifndef __MINGW32__
|
#ifndef __MINGW32__
|
||||||
#include <wspiapi.h>
|
#include <wspiapi.h>
|
||||||
#endif // __MINGW32__
|
#endif // __MINGW32__
|
||||||
#include <process.h> // for _beginthreadex()
|
#include <process.h> // For _beginthreadex().
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif // V8_WIN32_HEADERS_FULL
|
#endif // V8_WIN32_HEADERS_FULL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user