From 31105962a2a9ba51678e100fd8281439ac7119e7 Mon Sep 17 00:00:00 2001 From: "dcarney@chromium.org" Date: Fri, 13 Sep 2013 13:45:53 +0000 Subject: [PATCH] revert 16717 for breaking everything TBR=svenpanne@chromium.org BUG= Review URL: https://codereview.chromium.org/23708039 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/flag-definitions.h | 2 +- src/platform-posix.cc | 2 +- src/platform-win32.cc | 4 +++- src/platform.h | 7 ------- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 8e77ac809e..cc153af254 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -473,7 +473,7 @@ DEFINE_bool(debugger_auto_break, true, "automatically set the debug break flag when debugger commands are " "in the queue") DEFINE_bool(enable_liveedit, true, "enable liveedit experimental feature") -DEFINE_bool(break_on_abort, false, "always cause a debug break before aborting") +DEFINE_bool(break_on_abort, true, "always cause a debug break before aborting") // execution.cc // Slightly less than 1MB on 64-bit, since Windows' default stack size for diff --git a/src/platform-posix.cc b/src/platform-posix.cc index 69303bfd80..fe27eaf71f 100644 --- a/src/platform-posix.cc +++ b/src/platform-posix.cc @@ -222,7 +222,7 @@ void OS::Abort() { if (FLAG_break_on_abort) { DebugBreak(); } - V8_IMMEDIATE_CRASH(); + abort(); } diff --git a/src/platform-win32.cc b/src/platform-win32.cc index 7a90920a88..073b21a011 100644 --- a/src/platform-win32.cc +++ b/src/platform-win32.cc @@ -872,8 +872,10 @@ void OS::Sleep(int milliseconds) { void OS::Abort() { if (IsDebuggerPresent() || FLAG_break_on_abort) { DebugBreak(); + } else { + // Make the MSVCRT do a silent abort. + raise(SIGABRT); } - V8_IMMEDIATE_CRASH(); } diff --git a/src/platform.h b/src/platform.h index 13c126bf42..aa50cb4c72 100644 --- a/src/platform.h +++ b/src/platform.h @@ -51,13 +51,6 @@ #include "utils.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 # ifndef signbit namespace std {