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

Unified Diff: third_party/tcmalloc/chromium/src/internal_logging.h

Issue 10391178: 1. Enable large object pointer offset check in release build. (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
« no previous file with comments | « base/allocator/tcmalloc_unittest.cc ('k') | third_party/tcmalloc/chromium/src/tcmalloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/internal_logging.h
===================================================================
--- third_party/tcmalloc/chromium/src/internal_logging.h (revision 137587)
+++ third_party/tcmalloc/chromium/src/internal_logging.h (working copy)
@@ -113,12 +113,21 @@
} \
} while (0)
+#define CHECK_CONDITION_PRINT(cond, str) \
+do { \
+ if (!(cond)) { \
+ ::tcmalloc::Log(::tcmalloc::kCrash, __FILE__, __LINE__, str); \
+ } \
+} while (0)
+
// Our own version of assert() so we can avoid hanging by trying to do
// all kinds of goofy printing while holding the malloc lock.
#ifndef NDEBUG
#define ASSERT(cond) CHECK_CONDITION(cond)
+#define ASSERT_PRINT(cond, str) CHECK_CONDITION_PRINT(cond, str)
#else
#define ASSERT(cond) ((void) 0)
+#define ASSERT_PRINT(cond, str) ((void) 0)
#endif
// Print into buffer
« no previous file with comments | « base/allocator/tcmalloc_unittest.cc ('k') | third_party/tcmalloc/chromium/src/tcmalloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698