line up crashing with chrome

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23868025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
dcarney@chromium.org 2013-09-13 12:49:57 +00:00
parent 25372ac111
commit bbaf775dc4
4 changed files with 10 additions and 5 deletions

View File

@ -473,7 +473,7 @@ DEFINE_bool(debugger_auto_break, true,
"automatically set the debug break flag when debugger commands are " "automatically set the debug break flag when debugger commands are "
"in the queue") "in the queue")
DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature") DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature")
DEFINE_bool(break_on_abort, true, "always cause a debug break before aborting") DEFINE_bool(break_on_abort, false, "always cause a debug break before aborting")
// execution.cc // execution.cc
// Slightly less than 1MB on 64-bit, since Windows' default stack size for // Slightly less than 1MB on 64-bit, since Windows' default stack size for

View File

@ -222,7 +222,7 @@ void OS::Abort() {
if (FLAG_break_on_abort) { if (FLAG_break_on_abort) {
DebugBreak(); DebugBreak();
} }
abort(); V8_IMMEDIATE_CRASH();
} }

View File

@ -872,10 +872,8 @@ void OS::Sleep(int milliseconds) {
void OS::Abort() { void OS::Abort() {
if (IsDebuggerPresent() || FLAG_break_on_abort) { if (IsDebuggerPresent() || FLAG_break_on_abort) {
DebugBreak(); DebugBreak();
} else {
// Make the MSVCRT do a silent abort.
raise(SIGABRT);
} }
V8_IMMEDIATE_CRASH();
} }

View File

@ -51,6 +51,13 @@
#include "utils.h" #include "utils.h"
#include "v8globals.h" #include "v8globals.h"
// This is lined up with blink's method of crashing.
#if defined(__GNUC__)
#define V8_IMMEDIATE_CRASH() __builtin_trap()
#else
#define V8_IMMEDIATE_CRASH() ((void(*)())0)()
#endif
#ifdef __sun #ifdef __sun
# ifndef signbit # ifndef signbit
namespace std { namespace std {