From: Jonathan Liu Date: Thu, 8 Mar 2012 09:19:51 +0000 (+1100) Subject: [V8] Simplify silent abort by raising SIGABRT directly X-Git-Tag: qt-v5.0.0-alpha1~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfeec90dc633c9fb3885edf3e60294de0af77306;p=profile%2Fivi%2Fqtjsbackend.git [V8] Simplify silent abort by raising SIGABRT directly 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 --- diff --git a/src/3rdparty/v8/src/platform-win32.cc b/src/3rdparty/v8/src/platform-win32.cc index ba69bdc..97159aa 100644 --- a/src/3rdparty/v8/src/platform-win32.cc +++ b/src/3rdparty/v8/src/platform-win32.cc @@ -918,12 +918,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(); } diff --git a/src/3rdparty/v8/src/win32-headers.h b/src/3rdparty/v8/src/win32-headers.h index 1f0ee48..9c7771f 100644 --- a/src/3rdparty/v8/src/win32-headers.h +++ b/src/3rdparty/v8/src/win32-headers.h @@ -56,6 +56,7 @@ #include #ifdef V8_WIN32_HEADERS_FULL +#include // For raise(). #include // For LocalOffset() implementation. #include // For timeGetTime(). #ifdef __MINGW32__ @@ -78,7 +79,7 @@ #ifndef __MINGW32__ #include #endif // __MINGW32__ -#include // for _beginthreadex() +#include // For _beginthreadex(). #include #endif // V8_WIN32_HEADERS_FULL