This adds support for silent OS::Abort() with compilers other than
Microsoft Visual C++ (e.g. MinGW and MinGW-w64).
Upstream patch: https://chromiumcodereview.appspot.com/9597012/
Change-Id: Idfb80c7aaee0d6ba74900a076c715ae1f9535b3f
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
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();
}
#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__
#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