Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: third_party/tcmalloc/chromium/src/base/logging.h

Issue 10384117: Add a chromium version abort function for tcmalloc: Abort(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/base/logging.h
===================================================================
--- third_party/tcmalloc/chromium/src/base/logging.h (revision 135692)
+++ third_party/tcmalloc/chromium/src/base/logging.h (working copy)
@@ -45,6 +45,7 @@
#include <string.h> // for strlen(), strcmp()
#include <assert.h>
#include <errno.h> // for errno
+#include "base/abort.h"
#include "base/commandlineflags.h"
// On some systems (like freebsd), we can't call write() at all in a
@@ -85,7 +86,7 @@
if (!(condition)) { \
WRITE_TO_STDERR("Check failed: " #condition "\n", \
sizeof("Check failed: " #condition "\n")-1); \
- abort(); \
+ tcmalloc::Abort(); \
} \
} while (0)
@@ -95,7 +96,7 @@
if (!(condition)) { \
WRITE_TO_STDERR("Check failed: " #condition ": " message "\n", \
sizeof("Check failed: " #condition ": " message "\n")-1);\
- abort(); \
+ tcmalloc::Abort(); \
} \
} while (0)
@@ -118,7 +119,7 @@
sizeof("Check failed: " #condition ": ")-1); \
WRITE_TO_STDERR(strerror(err_no), strlen(strerror(err_no))); \
WRITE_TO_STDERR("\n", sizeof("\n")-1); \
- abort(); \
+ tcmalloc::Abort(); \
} \
} while (0)
@@ -135,7 +136,7 @@
do { \
if (!((val1) op (val2))) { \
fprintf(stderr, "Check failed: %s %s %s\n", #val1, #op, #val2); \
- abort(); \
+ tcmalloc::Abort(); \
} \
} while (0)
@@ -204,8 +205,10 @@
strcat(buf, "\n");
}
WRITE_TO_STDERR(buf, strlen(buf));
- if ((severity) == FATAL)
- abort(); // LOG(FATAL) indicates a big problem, so don't run atexit() calls
+ if ((severity) == FATAL) {
+ // LOG(FATAL) indicates a big problem, so don't run atexit() calls
+ tcmalloc::Abort();
+ }
}
// Note that since the order of global constructors is unspecified,

Powered by Google App Engine
This is Rietveld 408576698