| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6cec90a commit c96d701
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2452,7 +2452,6 @@ static void OnFatalError(const char* location, const char* message) { | |||
| 2452 | 2452 | } else { | |
| 2453 | 2453 | PrintErrorString("FATAL ERROR: %s\n", message); | |
| 2454 | 2454 | } | |
| 2455 | - DumpBacktrace(stderr); | ||
| 2456 | 2455 | fflush(stderr); | |
| 2457 | 2456 | ABORT(); | |
| 2458 | 2457 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,11 +38,18 @@ template <typename T> using remove_reference = std::remove_reference<T>; | |||
| 38 | 38 | ||
| 39 | 39 | // Windows 8+ does not like abort() in Release mode | |
| 40 | 40 | #ifdef _WIN32 | |
| 41 | - #define ABORT() raise(SIGABRT) | ||
| 41 | + #define ABORT_NO_BACKTRACE() raise(SIGABRT) | ||
| 42 | 42 | #else | |
| 43 | - #define ABORT() abort() | ||
| 43 | + #define ABORT_NO_BACKTRACE() abort() | ||
| 44 | 44 | #endif | |
| 45 | 45 | ||
| 46 | + #define ABORT() \ | ||
| 47 | + do { \ | ||
| 48 | + node::DumpBacktrace(stderr); \ | ||
| 49 | + fflush(stderr); \ | ||
| 50 | + ABORT_NO_BACKTRACE(); \ | ||
| 51 | + } while (0) | ||
| 52 | + | ||
| 46 | 53 | #if defined(NDEBUG) | |
| 47 | 54 | # define ASSERT(expression) | |
| 48 | 55 | # define CHECK(expression) \ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments