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:
yangguo@chromium.org 2012-03-05 09:52:14 +00:00
parent 5ce562cda8
commit 71c5924e63
2 changed files with 3 additions and 6 deletions

View File

@ -967,12 +967,8 @@ void OS::Sleep(int milliseconds) {
void OS::Abort() {
if (!IsDebuggerPresent()) {
#ifdef _MSC_VER
// Make the MSVCRT do a silent abort.
_set_abort_behavior(0, _WRITE_ABORT_MSG);
_set_abort_behavior(0, _CALL_REPORTFAULT);
#endif // _MSC_VER
abort();
raise(SIGABRT);
} else {
DebugBreak();
}

View File

@ -56,6 +56,7 @@
#include <windows.h>
#ifdef V8_WIN32_HEADERS_FULL
#include <signal.h> // For raise().
#include <time.h> // For LocalOffset() implementation.
#include <mmsystem.h> // For timeGetTime().
#ifdef __MINGW32__
@ -78,7 +79,7 @@
#ifndef __MINGW32__
#include <wspiapi.h>
#endif // __MINGW32__
#include <process.h> // for _beginthreadex()
#include <process.h> // For _beginthreadex().
#include <stdlib.h>
#endif // V8_WIN32_HEADERS_FULL